Azure ACS SSH登录失败,并显示“权限被拒绝(公共密钥)”; [英] Azure acs ssh login keeping failing with "permission denied (public key)"

查看:91
本文介绍了Azure ACS SSH登录失败,并显示“权限被拒绝(公共密钥)”;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用文章部署容器服务集群。我在OS X上使用过azure cli创建集群。在此过程中,我创建了一个新的SSH密钥对:

I have successfully deployed a mesos cluster on azure container service using article deploy an container service cluster. I used azure cli on OS X for creating the cluster. As part of the process I created a new ssh key pair:

ssh-keygen -t rsa -b 2048 

部署成功后,我尝试通过ssh进入端点,但收到权限被拒绝(公钥)

After deployment went successful I'm trying to ssh into the end point but receiving "Permission Denied (Public Key)"

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

冗长的[不是最后几行,不是全部]

The verbose [not all but last few lines]

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密钥时,我不记得任何问题,但可能是我不确定的东西,只是不确定它是什么云。

I don't recall any issues while creating the ssh keys but may be something I've missed just not sure what it cloud be.

推荐答案

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

I am not using local port forwarding, following worked for me : 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个部分

Also if you try creating the cluster using https://github.com/Azure/azure-quickstart-templates/tree/master/101-acs-mesos, in the parameter screen you are told the following regarding the key (in tooltip) "Configure all linux machines with the SSH RSA public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm" . So please make sure that your key has 3 parts as mentioned

这篇关于Azure ACS SSH登录失败,并显示“权限被拒绝(公共密钥)”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆