解决SSh连接过慢
Posted losbyday
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决SSh连接过慢相关的知识,希望对你有一定的参考价值。
ssh 连接的时候特别慢
解决方法:
修改配置文件
/etc/ssh/sshd_config
GSSAPIAuthentication yes --->no 81行左右
#UseDNS yes -->UseDNS no 122行左右
主要是禁用dns查询功能,这样可以加快ssh连接的速度
[[email protected] ~]# service sshd restart
停止 sshd: [确定]
正在启动 sshd: [确定]
[[email protected] ~]#
----------------------------
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED解决方法
这几天都这整linux集群,在做测试 Marking Packets with iptables 时遇到一个问题,想通过博客的形式记录此错误具体如下:
当ssh 10.1.1.61
时出现一下情况:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
d0:00:7c:bc:88:5c:dc:de:89:61:44:30:00:60:f9:b2.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
RSA host key for 192.168.4.222 has changed and you have requested strict checking.
Host key verification failed.
解决办法:
先cat一下家目录的.ssh/know_hosts
cat ~/.ssh/known_hosts
10.1.1.66 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAs86YOUHdfYUMHkJUmSpFeJCc0ztFQiWGIKlyrnf4KVCz+Ece/yY59QXnVG7b0DWA/wyzlaGRdumWFexX4Y7VE3WunEeXVPMRjF0YZgG5qW6EDXNMEquZzI5k7Jg96VGq+5ZzhtsRhUqXH1aNrMYydRfMUFDXTh+a3jKcoQLx9IiifouUuh5JEelql9w9FRgmOgOqmm3CVbn33mblyHZa0UOa3GDpFGRxFjxyPVLuOD90rJIVc126CxIK3TmsFS0emO7qxpz4mrNG/1xpCqgKxNejBkrlUtxzLxGbwuod3HPX7OB28uk1RdGsXhcZtKsPph3a04i7Y5C5QZ1XDXFzQw==
10.1.1.61 ssh-rsa AAAAB3NzaC1yc2EAAAABJUHjuHGUsI5fLkoQayuhjMLXaE69VlxA7en/SmxXs+VDjgXLGLLTLdSOxki1cBDzuPm4FefmES4A3X3mfAB8L46rFnPJe45hca4U6uC/IbJMlO8GhrWs+fpIYVdMmOkabBQl8li0J0bclmKlsRfpnsuSfT/hm5nBUUlmQcoXzGqvoLHRgV7JESdgvMoxlHzCSGRj62aBtJXktv5dbh5vCxjeh4jFrn4FrNo7IkG3fA6NoGBqUs6tENAclxI8F1b+479ywAqQedy233n2gW+l5v6Ms1uD+1jxxCiHx8OtO1/V7/vWLfEQfEMU323y4zHu4uXFLv9WB1XGNMgqEBlELSBkNpC4Pw==
进入此文件
vim ~/.ssh/known_hosts
删除10.1.1.61的相关rsa的信息即可
以上是关于解决SSh连接过慢的主要内容,如果未能解决你的问题,请参考以下文章