Cmd 运行SCP脚本时重复提示输入选项

Cmd 运行SCP脚本时重复提示输入选项,cmd,file-transfer,scp,Cmd,File Transfer,Scp,当我运行SCP脚本时 scp -W Scp\password.txt -P 22 server:/file_location scp -W Scp\password.txt -P 22 server:/file_location 在命令提示符中,我得到以下提示: Do you want to trust this new host key and continue connecting? Please type 'no','once', or 'always': 当我尝试键入上面任何选项的第

当我运行SCP脚本时

scp -W Scp\password.txt -P 22 server:/file_location
scp -W Scp\password.txt -P 22 server:/file_location
在命令提示符中,我得到以下提示:

Do you want to trust this new host key and continue connecting?
Please type 'no','once', or 'always':
当我尝试键入上面任何选项的第一个字母时,它会不断重复并提示相同的事情

Please type 'no','once', or 'always':
Please type 'no','once', or 'always':
Please type 'no','once', or 'always':

如何解决这个问题?

我也遇到了同样的问题,发现通过复制和粘贴您试图键入的单词就可以解决这个问题。对我来说,我总是复制作品并将其粘贴到cmd中。

你说你在运行脚本?请编辑您的问题以包含脚本。您知道调用什么特定程序来执行SCP操作吗?我不确定编写脚本如何改变/帮助问题。不过,我也添加了脚本。Stackoverflow是为了帮助编写软件。如果您只是在运行其他人的程序时遇到问题,那么这里并不是真正的主题。那个
scp
程序来自哪里?OpenSSH
scp
实用程序没有
-W
选项。你到底是怎么知道的?这篇文章省去了我很多麻烦。但真的,你怎么知道的?