解決 SSH Connection closed by foreign host 問題


Xshell 報錯 :

1.有可能是IP和別人沖突,改一下IP就好了

2.也有可能是文件權限的問題。改一下:

 cd /etc/ssh/
 chmod 600 ssh_host_*
 chmod 644 *.pub

3、也有可能是防火牆的問題

/etc/init.d/iptables status    //先看一下防火牆狀態
chkconfig iptables off       //關閉的命令

或者:

#停止firewall
systemctl stop firewalld.service

#禁止firewall開機啟動
systemctl disable firewalld.service

 

 

解決 SSH Connection closed by foreign host 問題

https://blog.csdn.net/tojohnonly/article/details/79746588

 https://blog.csdn.net/weixin_41585557/article/details/83895338

 

Connection closed by foreign host原因ip沖突及解決辦法

https://blog.csdn.net/qq_37755661/article/details/79152832

 

也可能是這個問題

https://blog.51cto.com/huazhixu123/1971465


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM