跑步ssh user@hostname大约需要30秒。这是场景:
- 这是本地LAN上的VM
- Windows和Mac机器可立即登录
- 我正在使用Debian,我可以用Ubuntu机器进行复制
- 使用Ubuntu的人说登录到我的计算机(本地LAN)也是即时的
- 使用主机名IP地址大约需要一半的时间(约15秒)
[ 更新 ]
使用ssh -vvv user@hostname,这是等待最多的地方:
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
然后在这里等待一点:
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found
@tobias我使用密码,但没有
—
tshepang 2011年
"~/.ssh"文件。那是目录,里面只有"known_hosts"文件。
您好像有15秒的DNS超时。也许服务器正在执行DNS查找;如果可以,请确保您有
—
吉尔(Gilles)“所以,别再邪恶了”,
UseDNS no在sshd_config服务器上。无论如何,请运行ssh -vvv user@hostname以查看登录名的挂起位置。
@吉尔谢谢。我更新了问题。我将要求管理员检查该UseDNS设置。
—
tshepang 2011年
@Tshepang:哦,您正在使用Kerberos(GSSAPI)身份验证。我不熟悉。如果配置错误,可能是造成延迟。您可以向管理员询问。DNS可能是个麻烦。这是最普遍的原因,但也许您的问题有所不同。
—
吉尔(Gilles)“所以
id_dsa或id_rsa文件是~/.ssh?也许您的ssh安装首先尝试了错误的身份验证,并且您的服务器没有拒绝,但只是忽略了该请求,从而导致30s超时