封锁ssh连接时提示的yes和no

关闭ssh连接时提示的yes和no设置前:?[root@commcy ~]# ssh 58.221.186.137The authenticity of host 58.2

关闭ssh连接时提示的yes和no

设置前:

?

[root@commcy ~]# ssh 58.221.186.137The authenticity of host '58.221.186.137 (58.221.186.137)' can't be established.RSA key fingerprint is a0:00:d3:33:54:96:40:03:ff:ad:15:a9:59:22:f4:2a.Are you sure you want to continue connecting (yes/no)?

?

设置后:

?

[root@commcy ~]# ssh 58.221.186.137Warning: Permanently added '58.221.186.137' (RSA) to the list of known hosts.root@58.221.186.137's password:

?

具体配置:

?

cat > ~/.ssh/config << endUserKnownHostsFile /dev/nullConnectTimeout 15StrictHostKeyChecking noend

?

或者直接增加"StrictHostKeyChecking=no"参数。

?

[root@commcy ~]# ssh -o StrictHostKeyChecking=no 58.221.186.137