Ubuntu 不询问“是否继续”的SCP
我正在尝试使用pem密钥将一些文件scp到不同的计算机,所以我不需要密码。然而,每次我试图连接到一个新的盒子,它都会严肃地问我,你想连接吗?你想保存钥匙吗?。。。这很烦人,在scp中是否有像yum-y这样的标志来回答所有这些问题Ubuntu 不询问“是否继续”的SCP,ubuntu,scp,Ubuntu,Scp,我正在尝试使用pem密钥将一些文件scp到不同的计算机,所以我不需要密码。然而,每次我试图连接到一个新的盒子,它都会严肃地问我,你想连接吗?你想保存钥匙吗?。。。这很烦人,在scp中是否有像yum-y这样的标志来回答所有这些问题 [user@commander tmp]$ scp -i mykey.pem target.txt ubuntu@xxx.xx.xx.xx:/commander The authenticity of host 'xxx.xx.xx.xx (xxx.xx.xx.xx)'
[user@commander tmp]$ scp -i mykey.pem target.txt ubuntu@xxx.xx.xx.xx:/commander
The authenticity of host 'xxx.xx.xx.xx (xxx.xx.xx.xx)' can't be established.
RSA key fingerprint is junk:junk:junk... many junks... goes here
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xxx.xx.xx.xx' (RSA) to the list of known hosts.
谢谢 是的,它有-o BatchMode=yes是直接候选。此外,您还可以更改HostKeyChecking,它在所述条件和UserKnownHostsFile下似乎是安全的。您可以在其手册页上获得更多详细信息