ssh第一次登录时,设置是否要输入“yes”

StrictHostKeyChecking ask

修改为no


[root@host-192-168-215-46 .ssh]#  cat /etc/ssh/ssh_config | grep ask

#   StrictHostKeyChecking ask

[root@host-192-168-215-46 .ssh]# 


[root@host-192-168-215-42 ~]# ssh host-192-168-215-42
The authenticity of host 'host-192-168-215-42 (192.168.215.42)' can't be established.
ECDSA key fingerprint is SHA256:Wrhf5vZfmVmcz002QcxO2j6BY9JvJM2esctxYO5ulxE.
ECDSA key fingerprint is MD5:0a:46:ca:d9:4e:67:49:79:e5:f5:ba:b1:ee:4d:73:2a.
Are you sure you want to continue connecting (yes/no)? ^C
[root@host-192-168-215-42 ~]# vi /etc/ssh/ssh_config 


[root@host-192-168-215-42 ~]# cat /etc/ssh/ssh_config | grep StrictHostKeyChecking 
    StrictHostKeyChecking no

[root@host-192-168-215-42 ~]# 


扫描二维码关注公众号,回复: 1092980 查看本文章

[root@host-192-168-215-42 ~]# ssh host-192-168-215-42
Warning: Permanently added 'host-192-168-215-42' (ECDSA) to the list of known hosts.
Last login: Tue May 29 09:44:21 2018

[root@host-192-168-215-42 ~]# logout
Connection to host-192-168-215-42 closed.





猜你喜欢

转载自blog.csdn.net/jackliu16/article/details/80493216