运行ssh user@hostname需要大约 30 秒。这是场景:
[更新]
使用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
Run Code Online (Sandbox Code Playgroud)
然后在这里等一下:
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
Run Code Online (Sandbox Code Playgroud)
小智 34
编辑您的“ /etc/ssh/ssh_config ”并注释掉这些行:
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
Run Code Online (Sandbox Code Playgroud)
或者,在 SSH 配置 ( ~/.ssh/config)中包含以下内容也有效:
GSSAPIAuthentication no
Run Code Online (Sandbox Code Playgroud)
Ear*_*rlz 33
我遇到了这个问题,并通过关闭 SSH 中的反向 DNS 解析来解决它。
因此,在sshd_config对服务器改变这样的:
#UseDNS yes
Run Code Online (Sandbox Code Playgroud)
对此:
UseDNS no
Run Code Online (Sandbox Code Playgroud)
您是否已验证您的 DNS 设置?
尝试设置mdns off在/etc/host.conf。
这禁用了 mdns 分辨率并帮助了我很多。
编辑:
gentoo 似乎处理这个有点不同。要禁用多播 DNS 查找,您必须更改文件/etc/nsswitch.conf.
应该有类似的东西:
hosts: files mdns
Run Code Online (Sandbox Code Playgroud)
将其更改为:
hosts: files dns
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
87650 次 |
| 最近记录: |