您的位置:首页 > 运维架构 > Linux

Xshll 登陆linux很慢解决方式

2015-08-31 16:18 555 查看
最近发现用Xshell登陆我自己的虚拟机很慢,找了下资料:
ssh的服务端在连接时会自动检测dns环境是否一致导致的,修改为不检测即可,操作如下:
修改文件:/etc/ssh/sshd_config
找到UseDNS
UseDNS yes --->默认为注释行UseDNS no --->把注释打开,改为no,然后重启ssh服务即可
[root@qiushilinux ~]# vim /etc/ssh/sshd_config
/UseDNS
120 #ClientAliveCountMax 3
121 #ShowPatchLevel no
122 UseDNS no
123 #PidFile /var/run/sshd.pid
124 #MaxStartups 10:30:100
125 #PermitTunnel no
126 #ChrootDirectory none
127
128 # no default banner path
129 #Banner none
130
131 # override default of no subsystems
132 Subsystem       sftp    /usr/libexec/openssh/sftp-server
133
134 # Example of overriding settings on a per-user basis
:set nu
改完之后重启sshd服务
[root@qiushilinux ~]# service sshd restart
停止 sshd:                                                [确定]
正在启动 sshd:                                            [确定]
重新用xshell连接可以发现速度变快了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: