ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ssh连接报警 Address ip maps to bogon,...- POSSIBLE BREAK-IN ATTEMPT

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

原创 Linux操作系统 作者:yhdmy 时间:2016-03-18 16:19:57 0 删除 编辑
一、问题描述
     通过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博客 ” ,链接:https://blog.itpub.net/26148431/viewspace-2059604/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
曾就职于铁道科学研究院,太极计算机公司,合力中税。负责过国家电网数据库部署、迁移、升级、灾备等实施规划工作。大唐发电厂、北京市公安局数据库运维及优化工作。现任工场高级DBA岗位,负责oracle、mysql数据库相关工作。拥有Oracle技术10g/11g的 OCP与OCM认证,Oracle YEP成员,OCM联盟成员。

注册时间:2013-04-22

  • 博文量
    111
  • 访问量
    1751029