可能重复:
连接时 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
Run Code Online (Sandbox Code Playgroud)
它对应于服务器上的以下内容:
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)
Run Code Online (Sandbox Code Playgroud)
任何想法为什么长时间延迟?一旦连接,会话运行良好,没有任何滞后或挂起。