我突然开始有问题通过SSH连接到我的Ubuntu 12.04服务器。
当我尝试login与SSH用户@主机什么都没有发生。 如果我打开另一个terminal,而第一个还挂着我可以访问SSH的就好了。
我试过传递-v标志,但第一个terminal仍然挂起。 只有第二个责任。
我最后一次成功的sshlogin是几天前,因为没有对服务器做任何改变,所以我似乎无法弄清楚为什么我突然无法连接。
有没有人有什么想法?
这是-v标志在成功login时告诉我的:
ug1: Host 'host.com' is known and matches the RSA host key. debug1: Found key in /home/Administrator/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Trying private key: /home/Administrator/.ssh/identity debug1: Offering public key: /home/Administrator/.ssh/id_rsa debug1: Authentications that can continue: publickey,password debug1: Trying private key: /home/Administrator/.ssh/id_dsa debug1: Next authentication method: password [email protected]'s password: debug1: Authentication succeeded (password). debug1: channel 0: new [client-session] debug1: Entering interactive session.
可能是客户端的DNS问题。 请检查您在计算机上使用的所有DNS服务器是否parsing您尝试访问的主机。 在像unix系统名字服务器可能会在/etc/resolv.conf。 然后您可以看到他们是否使用主机命令回答您的主机。
主机your.host.com your.dns.server.com
如果它没有响应你的服务器的IP,你可以改变你使用的名字服务器(如何做到这一点取决于你的系统),或者添加一行到你的hosts文件,以便your.host.com总是解决到相同的地址而不查询名称服务器。 对于类似unix的系统,这将是/ etc / hosts,你可以添加一个如下所示的行:
111.111.111.111 your.host.com
根据您的telnet响应您的端口22是在端口23前进检查您的network/firewall setting为and.Logs是正常的。