AKS: Logging into worker nodes and get Permission denied (publickey)

1/9/2018

AKS- Can't log into one of the worker nodes (VM). I assigned the public IP as per https://gist.github.com/tsaarni/624d5406e442f08fe11083169c059a68 but still no luck. I get the error below:

sushainMac:.kube sushain_chhangani$ ssh azureuser@52.191.195.250 Permission denied (publickey).

Here subscription ID looks like: e84ff951-xxxxxxxxxxxx

-- codeRelix
azure
azure-container-service
kubernetes

2 Answers

3/6/2018

if you create AKS from Azure portal, you can specify the user name of VM.

at that case, user name is not azureuser any more

you can find out the user name and public key from Azure portal

enter image description here

-- SILENCE
Source: StackOverflow

1/9/2018

sushainMac:.kube sushain_chhangani$ ssh azureuser@52.191.195.250 Permission denied (publickey).

Please find your private key then use this script to SSH:

ssh azureuser@52.191.195.250 -i ~/.ssh/<your private key>

Update:

When we use CLI 2.0 to create AKS, we can find the key here:

enter image description here

Update2:

Reset public key here:

enter image description here

-- Jason Ye
Source: StackOverflow