Disabling ssh to ask for every new host key

Normally when you try to connect a remote side with ssh, in the first time ssh asks for a yes/no question to whether you’re sure to continue connecting or not.

When you say yes, it makes a new record in ~/.ssh/known_hosts file also. We almost say yes in this question and for this reason, sometimes it is desirable to disable this behaviour. To do this, just comment out and change it to no from ask in /etc/ssh/ssh_config file like below:

StrictHostKeyChecking no