出于安全性考虑,ssh默认会提示安全检查,例如:
The authenticity of host '172.22.0.12 (172.22.0.12)' can't be established. RSA key fingerprint is c1:11:ed:dd:6a:7a:fe:5d:e0:21:91:f1:85:cb:03:93. Are you sure you want to continue connecting (yes/no)?
但是这将影响交互模式脚本运行,我们可以加一个参数忽略它,直接登录。
ssh -o StrictHostKeyChecking=no search@172.22.0.11