Jan 11

解决ssh延迟 不指定

felix021 @ 2016-1-11 17:29 [随想] 评论(0) , 引用(0) , 阅读(11221) | Via 本站原创 | |
不知道为什么这么多年都没遇到啥问题,到了钱厂以后接连遇到3种不同的ssh延迟,觉得有必要记一下了:

1. GSSAPIAuthentication

ssh -vv someserver 可以看到如下类似字样的:
引用
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


在 ~/.ssh/config(也可以是 /etc/ssh/ssh_config)加上
引用
Host *
  GSSAPIAuthentication no
  GSSAPIKeyExchange no


2. AddressFamily

ssh -vv 在这里卡住的:
引用
debug2: ssh_connect: needpriv 0

加上
引用
Host *
  AddressFamily inet


3. UseDNS

在server端卡住的(忘了log是啥了),在server的 /etc/ssh/sshd_config 加上
引用
UseDNS no



ssh的坑真多,感觉应该抽空整理一个全集,包括之前记录过的 ServerAliveCountMax/ClientAliveCountMax,还有诸如GatewayPorts之类的。

参考:
Fixing SSH login long delay
debug2: ssh_connect: needpriv 0 stuck - Fix.





欢迎扫码关注:




转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   *非必须
网址   电邮   [注册]