0

我将以下链接中的代码与我的批处理脚本一起使用。但它要求输入密码。当我为 pw 提供密码时,它不起作用。当我在命令提示符下尝试时,它第一次要求是或否。在第二次尝试中,它不是那样问的。所以我需要批处理脚本,它需要使用密码将本地文件加载到 WINSCP。还需要回答y。

https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter5.html

我在批处理脚本中使用的示例代码:

pscp c:\documents\foo.txt fred@example.com:/tmp/foo
pw Exam454656.
4

1 回答 1

1

pscp有一些具体的参数。-pw是您正在寻找的那个。

pscp -pw Exam454656 c:\documents\foo.txt fred@example.com:/tmp/foo
于 2020-07-14T17:47:35.483 回答