Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 不询问“是否继续”的SCP_Ubuntu_Scp - Fatal编程技术网

Ubuntu 不询问“是否继续”的SCP

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)'

我正在尝试使用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)' 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下似乎是安全的。您可以在其手册页上获得更多详细信息