成功登录前 10 秒 SSH 延迟

成功登录前 10 秒 SSH 延迟

可能重复:
ssh 连接时延迟

我有一个在 Ubuntu 11.04 机器上运行 Virtualbox 4.0.4 的 Scientific Linux 虚拟客户机。

当我通过 SSH 从主机连接到客户机时,会出现总是暂停 10 秒钟,等待公钥明显被验证。

在客户端,我看到:

debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
----10 second pause----
debug1: Server accepts key: pkalg ssh-rsa blen 149

对应服务器上的以下内容:

Jul 11 20:53:05 localhost sshd[4275]: debug1: userauth-request for user ****** service ssh-connection method publickey
Jul 11 20:53:05 localhost sshd[4275]: debug1: attempt 1 failures 1
Jul 11 20:53:05 localhost sshd[4275]: debug1: test whether pkalg/pkblob are acceptable
----10 second pause----
Jul 11 20:53:15 localhost sshd[4272]: debug1: PAM: setting PAM_RHOST to "192.168.56.1"
Jul 11 20:53:15 localhost sshd[4272]: debug1: PAM: setting PAM_TTY to "ssh"
Jul 11 20:53:15 localhost sshd[4272]: debug1: temporarily_use_uid: 500/500 (e=0/0)

知道为什么延迟这么久吗?连接后,会话运行良好,没有任何延迟或挂起。

答案1

您可能遇到了反向 DNS 问题。您连接的主机是否解析了您的源 IP?

相关内容