Azure acs ssh登录保持失败,“权限被拒绝(公钥)”

时间:2016-04-03 00:11:23

标签: azure ssh containers azure-cli

我已使用文章deploy an container service cluster在azure容器服务上成功部署了一个mesos群集。我在OS X上使用azure cli来创建集群。作为该过程的一部分,我创建了一个新的ssh密钥对:

ssh-keygen -t rsa -b 2048 

部署成功后我尝试ssh into the end point但收到“权限被拒绝(公钥)”

 ssh -L 80:localhost:80 -N azureuser@xyz.eastus2.cloudapp.azure.com -p 2200 -v

详细[不是最后几行]

debug1: Host '[xyz.eastus2.cloudapp.azure.com]:2200' is known and matches the RSA host key.
debug1: Found key in /var/root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /var/root/.ssh/id_rsa
debug1: Trying private key: /var/root/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

在创建ssh密钥时我不记得任何问题,但可能是我错过的东西,只是不确定它是什么。

1 个答案:

答案 0 :(得分:3)

我没有使用本地端口转发,以下为我工作:ssh -i /<path>/id_rsa username@masteralias.westus.cloudapp.azure.com -p 2200 -v

此外,如果您尝试使用https://github.com/Azure/azure-quickstart-templates/tree/master/101-acs-mesos创建群集,请在参数屏幕中告知以下有关密钥的信息(在工具提示中)“使用​​SSH RSA公钥字符串配置所有Linux计算机。您的密钥应该 包括三个部分,例如'ssh-rsa AAAAB ... snip ... UcyupgH azureuser @ linuxvm“。所以请确保你的密钥有3部分如上所述