先说一下我们的环境,是一个master下面有多个GUI,每个GUI下面都有好多slave,现在遇到的情况是,我ssh 进去这个master下的任何一个slave的时候,要等好久才能进去,上网搜了一些方法
都试过了,也没效果,现将试过的方法罗列如下,还希望,高手能够帮忙想出新的办法,先行谢过!
试过的方法:
1、在server上/etc/hosts文件中把你本机的ip和hostname加入
2、在server上/etc/ssh/sshd_config文件中修改或加入UseDNS=no,另外在authentication gssapi-with-mic也有可能出现问题,在server上/etc/ssh/sshd_config文件中修改GSSAPIAuthentication no.(还有说是修改/etc/ssh/ssh_config中的GSSAPIAuthentication ,将其设为no)
3、修改server上/etc/nsswitch.conf中hosts为hosts: files
4、reboot server使配置生效
/etc/init.d/sshd restart重启sshd进程使配置生效。
以上方法都试过了还是不行
用ssh -v leg-1
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to leg-2 [192.168.60.30] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type 2
debug1: loaded 3 keys
到这步就一直不动了!!!