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

设置前:

 

[root@commcy ~]# ssh 58.221.186.137
The 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.137
Warning: Permanently added '58.221.186.137' (RSA) to the list of known hosts.
[email protected]'s password:

 

具体配置:

 

cat > ~/.ssh/config << end
UserKnownHostsFile /dev/null
ConnectTimeout 15
StrictHostKeyChecking no
end

 

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

 

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

你可能感兴趣的:(ssh)