ssh连接报警 Address ip maps to bogon,...- POSSIBLE BREAK-IN ATTEMPT

一、问题描述
     通过SecureCRT软件来连接服务器,可以连接成功,但是有报警,而且速度有些慢,经过查询发现是在连接 OpenSSH服务器的时候,假如 UseDNS选项是打开的话,服务器会先根据客户端的 IP地址进行 DNS PTR反向查询出客户端的主机名,然后根据查询出的客户端主机名进行DNS正向A记录查询,并验证是否与原始 IP地址一致,通过此种措施来防止客户端欺骗。平时我们都是动态 IP不会有PTR记录,所以打开此选项也没有太多作用。我们可以通过关闭此功能来提高连接 OpenSSH 服务器的速度。

二、故障处理
1.连接过程中报错
[oracle@db ~]$ ssh 10.10.100.6
Address 10.10.100.6 maps to bogon, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Last login: Fri Mar 18 10:02:03 2016 from 10.10.102.38
[oracle@db2 ~]$

2.退出返回至当前主机
[oracle@db2 ~]$ exit
[oracle@db ~]$
[oracle@db ~]$ exit
logout
[root@db ~]#

3.修改sshd_config配置文件,共两处
[root@db ~]# cd /etc/ssh
[root@db ssh]# pwd
/etc/ssh
[root@db ssh]# ls
total 172
drwxr-xr-x.   2 root root   4096 Mar 18 14:51 .
drwxr-xr-x. 118 root root  12288 Mar 18 14:55 ..
-rw-------.   1 root root 125811 Dec 13  2012 moduli
-rw-r--r--.   1 root root   2047 Dec 13  2012 ssh_config
-rw-------    1 root root   3890 Mar 18 14:47 sshd_config
-rw-------.   1 root root    668 Oct 21  2012 ssh_host_dsa_key
-rw-r--r--.   1 root root    590 Oct 21  2012 ssh_host_dsa_key.pub
-rw-------.   1 root root    963 Oct 21  2012 ssh_host_key
-rw-r--r--.   1 root root    627 Oct 21  2012 ssh_host_key.pub
-rw-------.   1 root root   1671 Oct 21  2012 ssh_host_rsa_key
-rw-r--r--.   1 root root    382 Oct 21  2012 ssh_host_rsa_key.pub


4.将sshd_config中的GSSAPIAuthentiction yes 改成 no ,UseDNS yes 改成 no
[root@db ssh]# vi sshd_config



5.重启 OpenSSH服务器
[root@db ssh]# /etc/init.d/sshd restart
Stopping sshd: [  OK  ]
Starting sshd: [  OK  ]

6.再次登录,问题解决,速度也正常
[oracle@db ~]$ ssh 10.10.100.6
Last login: Fri Mar 18 15:19:07 2016 from 10.10.100.111

三、总结
     此问题虽然暂时解决,但是对系统中的配置还是一知半解。希望对系统或网络感兴趣的朋友继续深入进去, 最好将该文件中的配置全部学习一下,并分享出来。
     Where there's a will, there's a way.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26148431/viewspace-2059604/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26148431/viewspace-2059604/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值