首页 > 系统服务 > 详细

ssh 用xshell远程连接,连接不上

时间:2017-11-03 21:30:49      阅读:334      评论:0      收藏:0      [点我收藏+]

Nov 3 19:31:35 fqhy_devlp sshd[8195]: Server listening on 0.0.0.0 port 22.
136 Nov 3 19:31:47 fqhy_devlp sshd[8206]: refused connect from 101.254.207.4 (101.254.207.4)
137 Nov 3 19:43:21 fqhy_devlp sshd[8576]: refused connect from 101.254.207.4 (101.254.207.4)
138 Nov 3 19:43:52 fqhy_devlp sshd[8602]: refused connect from 101.254.207.4 (101.254.207.4)
139 Nov 3 19:44:36 fqhy_devlp sshd[8648]: Accepted password for yuanwz from 101.254.207.4 port 52700 ssh2
140 Nov 3 19:44:36 fqhy_devlp sshd[8648]: pam_unix(sshd:session): session opened for user yuanwz by (uid=0)
141 Nov 3 19:44:49 fqhy_devlp sshd[8681]: refused connect from 101.254.207.4 (101.254.207.4)
142 Nov 3 19:47:47 fqhy_devlp sshd[8746]: refused connect from 101.254.207.4 (101.254.207.4)
143 Nov 3 19:55:45 fqhy_devlp sshd[8195]: Received signal 15; terminating.

使用默认的配置登录不上,偶尔登录上,会把IP写入/etc/hosts.deny,清空该文件后,依然会写入

解决办法:

在/etc/hosts.allow 里 写入 sshd:ALL即可

去掉下面几行,即不限制IP登录
#AllowUsers liubaobao@211.157.155.67,123.57.163.30
#AllowUsers root@123.57.163.30,211.157.155.70,125.33.251.149,182.92.236.4,211.157.155.67
#AllowUsers rlp@211.157.155.70,123.57.163.30,182.92.236.4,125.33.251.109,211.157.155.67,1.12.193.199,1.15.24.16
#AllowUsers zly@211.157.155.70,123.57.163.30
#AllowUsers yuanwz@211.157.155.70,123.57.163.30,125.33.251.149,223.223.195.226,211.157.155.67
#AllowUsers zcq@211.157.155.70

 

#AllowGroups sshgroup
#AllowGroups dev

ssh 用xshell远程连接,连接不上

原文:http://www.cnblogs.com/renliping/p/7780303.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!