Are you sure you want to continue connecting (yes/no)
每次ssh 進入一台新機器都會跳出如下的提示:
The authenticity of host '111.222.333.444 (111.222.333.444)' can't be established.
RSA key fingerprint is f3:cf:58:ae:71:0b:c8:04:6f:34:a3:b2:e4:1e:0c:8b.
Are you sure you want to continue connecting (yes/no)?
感覺很煩,有以下方法可以解決這個問題:
1. 加入一個參數:
ssh -o "StrictHostKeyChecking no" user@host
2.修改配置檔案
在檔案/etc/ssh/ssh_config(全局)或者~/.ssh/config(某使用者)開頭加入以下内容:
Host 192.168.0.*
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
or
Host *