Ssh – How to suppress the “…this does not map back…” message when using SSH

scriptingshellssh

I am writing a script that attaches to several of our machines via SSH to check some usage stats.

Each time I do:

ssh -i ~/.ssh/ourkeyfile.pem user@host

I get the typical message:

Address X.X.X.X maps to somedomain.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

Is there a commandline switch for ssh that lets me suppress this message from appearing in the output of my script?

Best Answer

Well the script way is

2>&1 > /dev/null

The correct way is to fix ssh connection, host names.


Yeah, meaning need to fix known_hosts in .ssh folder.