我在Azure上创建了Ubuntu 16.x VM,并选择了用于身份验证的userid / password选项。我可以使用Azure门户上的浏览器内CLI登录到VM。但是,当我尝试在Windows 10计算机上从Linux的Windows子系统(Ubuntu)ssh时,我得到
ssh_exchange_identification: Connection closed by remote host
尝试ssh
使用-v
选项并获得以下内容
ssh -v [email protected]
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to xx.xxx.xx.xxx [xx.xxx.xx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/userid/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/userid/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/userid/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/userid/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/userid/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/userid/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/userid/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/userid/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_exchange_identification: Connection closed by remote host
ssh
不使用ssh
身份验证就无法从Windows上的Ubuntu上进行吗?
更新:原来是ssh
从公司环境内部筛选出来的。我能够ssh
在家中成功。
在Windows的Linux子系统(ubuntu)命令行上,您可以像执行其他任何linux一样执行ssh。我一直都在用它。(适用于Windows的Linux子系统使Windows 10更好了恕我直言)所以也可以执行相同的命令,但是要多加几个v
ssh -vvv userid@ipaddr
看起来服务器可能只接受带有密钥的ssh。在使用用户名和密码之前(在Azure控制台之外)您是否已登录到该服务器?如果可能,还使用-vv粘贴Azure连接的输出。
通常,它将通过ssh键并寻找匹配项(您确实寻找了匹配项),然后转到下一步时,您将收到类似的消息。
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
我在您的输出中看不到这一点。我认为应该以-v表示,但希望看到详细的详细输出。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句