Jan 11

解决ssh延迟 不指定

felix021 @ 2016-1-11 17:29 [随想] 评论(0) , 引用(0) , 阅读(11180) | 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.

分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]