免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1801 | 回复: 1
打印 上一主题 下一主题

[求助] 禁止特定IP的ssh访问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-01-05 00:28 |只看该作者 |倒序浏览
本帖最后由 lbseraph 于 2013-01-05 16:28 编辑

今天发现有主机网络中断,检查、主机、应用、网络均正常,
syslog有如下信息:
Jan  4 20:24:45 hqwls03 sshd[6187]: Did not receive identification string from 10.87.21.104
Jan  4 20:29:46 hqwls03 sshd[6360]: Did not receive identification string from 10.87.21.104
Jan  4 20:34:45 hqwls03 sshd[6522]: Did not receive identification string from 10.87.21.104
Jan  4 20:39:45 hqwls03 sshd[6684]: Did not receive identification string from 10.87.21.104
Jan  4 20:44:45 hqwls03 sshd[6859]: Did not receive identification string from 10.87.21.104
Jan  4 20:49:45 hqwls03 sshd[7023]: Did not receive identification string from 10.87.21.104
Jan  4 20:54:45 hqwls03 sshd[7189]: Did not receive identification string from 10.87.21.104
Jan  4 20:59:45 hqwls03 sshd[7362]: Did not receive identification string from 10.87.21.104
我应该怎么禁用这个IP SSH呢

论坛徽章:
48
15-16赛季CBA联赛之青岛
日期:2021-01-07 13:41:2315-16赛季CBA联赛之上海
日期:2020-12-01 18:02:0720周年集字徽章-20	
日期:2020-10-28 14:14:2620周年集字徽章-20	
日期:2020-10-28 14:04:3015-16赛季CBA联赛之天津
日期:2020-10-18 22:51:412016猴年福章徽章
日期:2016-02-18 15:30:3415-16赛季CBA联赛之北控
日期:2015-12-22 13:30:48操作系统版块每日发帖之星
日期:2015-12-07 06:20:00操作系统版块每日发帖之星
日期:2015-09-04 06:20:002015亚冠之德黑兰石油
日期:2015-08-05 18:46:082015年亚洲杯之巴勒斯坦
日期:2015-04-19 10:42:502015年亚洲杯之巴林
日期:2015-04-09 08:03:23
2 [报告]
发表于 2013-01-05 16:30 |只看该作者
本帖最后由 lbseraph 于 2013-01-05 16:31 编辑

想到下面两个方法:

1. 在文件/etc/hosts.deny里面加一行保存即可;
sshd:10.87.21.104:deny

2. 或者用IPF(防火墙)禁止该IP的ssh访问即可。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP