解決SSh連線過慢

weixin_34162629發表於2016-09-10

ssh 連線的時候特別慢
解決方法:
修改配置檔案
/etc/ssh/sshd_config
GSSAPIAuthentication yes --->no 81行左右
#UseDNS yes -->UseDNS no 122行左右
主要是禁用dns查詢功能,這樣可以加快ssh連線的速度
[root@localhost ~]# service sshd restart
停止 sshd: [確定]
正在啟動 sshd: [確定]
[root@localhost ~]#
----------------------------
   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的資訊即可

相關文章