在.ssh/config(或者/etc/ssh/ssh_config)中配置:
Host xxxxx HostName xxxx User xxxx Port 2222 IdentityFile ~/.ssh/id_rsa StrictHostKeyChecking no UserKnownHostsFile /dev/null