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 --ssh-key-file` SSHException

See original GitHub issue

I generated an ssh key with ssh-keygen -f ~/.ssh/kube_rsa -t rsa -N ''. Then provisioned an acs k8s cluster using az acs create -g ${project_id} -n ${cluster_name} --orchestrator-type Kubernetes \ --ssh-key-value ~/.ssh/kube_rsa.pub --agent-vm-size Standard_DS2_v2 --agent-count 2, which provisioned successfully. Finally, I ran az acs kubernetes get-credentials -g ${project_id} -n ${cluster_name} --ssh-key-file ~/.ssh/kube_rsa. After running the get-credentials command I received the following error:

not a valid EC private key file
Traceback (most recent call last):
  File "/home/demo/.local/lib/python2.7/site-packages/azure/cli/main.py", line 37, in main
    cmd_result = APPLICATION.execute(args)
  File "/home/demo/.local/lib/python2.7/site-packages/azure/cli/core/application.py", line 157, in execute
    result = expanded_arg.func(params)
  File "/home/demo/.local/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 343, in _execute_command
    raise ex
SSHException: not a valid EC private key file

The private key is the following (don’t worry, it has already been deleted):

-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAzZde4MnwxkQSCFJsDBEao+owweKTfOy2HkmRkTqz9ks1SL4Q
06NY+RS3qJ8UD64BwEyose1LTdOtoxXUGFLA4c6EQP/G+FnHYKvBeRkGVwqnQ10c
M78aYhnOswNZLZu2gtIRWfsAacZn7aC/q/w+M2MxTYRFNr4cu3kKb7KUoWi3U0I+
n7Bvp9Nj7DsLiJAnmyPFUaUws5P4LhfwH1JF01TLOJtdawooVQxwKUdX0Bsbehf/
xm+LSA3yXfGN1blmh5TyMlSdYElcmFKSJiUM9585jo04JwyDdKrdZexhWgd1e36B
h9X4PM2QcaKWCTAEmO5d/qM9EnozMOW3l8Mz9wIDAQABAoIBAQCEOPcfMSE2Ei9a
xM+SjymIB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LcAK7WjP7knI8idee
19uOt9kQ2WzQdNDDMC8zr0E8UQrBSKrqllov+HHqw/n9qA1ZxcFmTDiplaiQPa/i
au5bAAr7NYhwhTPkWH0pGlorkJ3NOyXDfL8NZRd0C/Q4ziD9bNMmJ2M=
-----END RSA PRIVATE KEY-----

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brendandburnscommented, Mar 8, 2017

Acknowledged, will try to repro. (and ssh into your box 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

az acs kubernetes get-credentials fails error Incompatible ...
SSHException : Incompatible ssh peer (no acceptable kex algorithm)'. To Reproduce create acs cluster az login az acs kubernetes get- ...
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 >
Getting error while giving command az aks get-credentials ...
I have installed Kubectl and minikube and config file also set in my local path under users/.kube/config but still i am getting this...
Read more >
azure-cli-acs 2.4.4
“az aks get-credentials” will prompt to overwrite duplicated values ... az acs/aks install-cli will install to under %USERPROFILE%.azure-kubectl on Windows.
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 >

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