Jump to Navigation

214 - Reverse mapping on ssh

If you connect a server with ssh, you get an error message sometimes.

# ssh 206.133.170.124

reverse mapping checking getaddrinfo for 192.168.1.200.my.example.net failed - POSSIBLE BREAK-IN ATTEMPT!
Last login: Wed Jan 25 09:20:51 2012 from 118.126.98.216.my.serve01.net

What this is telling us is that although we are connecting to my.example.com the IP address of the server we are connecting to actually maps back to 192-168-1-200.my.example.us in this example. When this actually happened to me, it's because the reverse DNS had not been set up for the server
(which would map e.g. 192.168.1.200 to my.example.com as well as vice versa).

* Hosts file solution

If you knew this reverse mapping was OK, you can add an entry to your hosts file and it will stop the error message from happening.
For the above example, you would add the following to my hosts file:

# vi /etc/hosts

192.168.1.200  my.example.com

When you log in using SSH from the command line, you won't get that error message any more.

 

 



Main menu 2

Story | by Dr. Radut