无法通过SSH连接到Microsoft Azure Linux VM(Ubuntu 17.10)

时间:2018-02-02 04:51:03

标签: azure ssh virtual-machine

我创建了一个新的Linux VM(Ubuntu 17.10),并试图通过CloudShell连接到SSH,但命令ssh suren@40.71.218.244需要永远,并且无法连接。

enter image description here

端口22已启用。

enter image description here

我尝试使用本地mac远程登录,并且能够连接

telnet> open suren.eastus.cloudapp.azure.com 22
Trying 40.71.218.244...
Connected to suren.eastus.cloudapp.azure.com.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.5p1 Ubuntu-10ubuntu0.1
Connection closed by foreign host. here

我缺少什么?

2 个答案:

答案 0 :(得分:1)

尝试了几件事后,浏览器的硬刷新和重新登录Azure Portal就可以了。登录后,我可以看到选项"请求cloudhsell并选择类型"。

添加屏幕截图可能有助于其他人。

Azure create cloudshell

Azure cloudshell created

Azure ssh/logged into vm

答案 1 :(得分:0)

从上面已经完成的故障排除中得出的唯一结论是,您处于阻止端口22的受限制网络中。

您可以使用端口查询工具(如tcping,psping或portqry)来确定端口22(默认SSH端口)是否正在侦听。如果您的系统无法通过端口22进行通信,那么您可能希望在连接到其他网络时尝试。