question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az acs kubernetes get-credentials fails when specifying ssh-key-file

See original GitHub issue

As of v2.0.4, I get an error when I use --ssh-key-file along with az acs kubernetes get-credentials (the command works if my key is in the default location of ~/.ssh/id_rsa).

I took a look at past commits and I believe https://github.com/Azure/azure-cli/commit/b26248718cc1a66e27836b0c5d238cdc2bfcc997 by @derekbekoe and @brendandburns might’ve introduced the bug. It looks like ‘pkey’ is set to ‘None’ inside ‘SecureCopy’, but never updated. I also couldn’t figure out where the newly-added ‘keys’ array was used in that function

Here’s my full error:

No authentication methods available
Traceback (most recent call last):
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/main.py", line 36, in main
    cmd_result = APPLICATION.execute(args)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/application.py", line 201, in execute
    result = expanded_arg.func(params)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 417, in _execute_command
    reraise(*sys.exc_info())
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 399, in _execute_command
    result = op(client, **kwargs) if client else op(**kwargs)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/command_modules/acs/custom.py", line 690, in k8s_get_credentials
    _k8s_get_credentials_internal(name, acs_info, path, ssh_key_file)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/command_modules/acs/custom.py", line 711, in _k8s_get_credentials_internal
    '.kube/config', path_candidate, key_filename=ssh_key_file)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/command_modules/acs/acs_client.py", line 48, in SecureCopy
    ssh.connect(host, username=user, pkey=pkey)
  File "/opt/az/local/lib/python2.7/site-packages/paramiko/client.py", line 381, in connect
    look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
  File "/opt/az/local/lib/python2.7/site-packages/paramiko/client.py", line 623, in _auth
    raise SSHException('No authentication methods available')
SSHException: No authentication methods available

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
brendandburnscommented, May 4, 2017

(and fwiw, I’m going to improve testing too so that I don’t break this again in the future)

1reaction
derekbekoecommented, May 3, 2017

It will be released later this week or next week. Alternatively, we have nightly builds. Since it was merged today, it’ll be available tomorrow. https://github.com/Azure/azure-cli/#nightly-builds

Read more comments on GitHub >

github_iconTop Results From Across the Web

az acs kubernetes get-credentials --ssh-key-file does not ...
When using a custom ssh key with the command line option --ssh-key-file for az acs kubernetes get-credentials if a file exists in .ssh...
Read more >
az acs kubernetes get-credentials fails with error The api ...
Describe the bug successfully login usinag az login --service-principal -u ${CLIENT_ID} -p ${SECRET_KEY} --tenant ${TENENT_ID}
Read more >
az aks get-credentials with custom ssh key? - Stack Overflow
In Azure ACS, we need use ssh key to access k8s master VM to download credentials to your local PC. az acs kubernetes...
Read more >
Kubernetes Adventures on Azure — Part 1 (Linux Cluster)
I experienced some issue with az acs cli command that seems (to me) not yet ready for the prime time. Easiest way to...
Read more >
Kubernetes Template: Deploy a Single BigchainDB Node
az acs kubernetes get-credentials \ --resource-group <name of resource group containing the ... but you get an error message, then try adding --ssh-key-file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found