急!!!ssh要很久以后才登陆进去!!!试了网上的一些方法还是不行

本文详细探讨了在master节点下多个slave环境中的SSH连接延迟问题,并提供了已尝试的有效解决方案,包括调整hosts文件、修改sshd_config配置、优化nsswitch.conf设置等。通过这些方法,可以显著提升SSH连接速度,提高工作效率。

 

    先说一下我们的环境,是一个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
到这步就一直不动了!!!

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值