标签:sshd server unexpectedly closed network connection 远程
远程sshd提示: Server unexpectedly closed network connection
重启后服务器效果也一样,经过一段时间连接后,终于连上远程了。之后新建一个远程连接,发现还是提示:
Server unexpectedly closed network connection
百度和谷歌搜了一会,修改后sshd_config,效果也一样。
之后看下
[root@localhost log]# tail -F /var/log/secure //查看登录日志文件
发现了问题,好多IP一直暴力破解,登录信息一直在刷屏幕
[root@localhost log]# vim /etc/ssh/sshd_config //修改端口为3330
[root@localhost log]# iptables -I INPUT -p tcp --dport 3330 -j ACCEPT //添加防火墙3330端口 允许
[root@localhost log]# service iptables save //保存规则
[root@localhost log]# /etc/init.d/sshd restart //重启sshd
[root@localhost log]# tail -F /var/log/secure //再查看日志 已经没有登录日志再刷屏幕了
在远程登录,正常了。
看日志很重要。很重要。。
远程 sshd提示:Server unexpectedly closed network connection
标签:sshd server unexpectedly closed network connection 远程
原文地址:http://12100846.blog.51cto.com/12090846/1880135