我得到了“命令‘open’的参数太多了”。尝试连接到服务器以执行以下命令时出错,
option confirm off
open sftp://uname:pwd@abc.example.com/ -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx" -timeout=60 -rawsettings SendBuf=0 SshSimple=1 -rawtransfersettings IgnorePermErrors=0 PreserveTimeDirs=0
我已经检查了很多其他的帖子,提到了使用双引号来表示有空格的文本,我想我的上面的脚本是抱怨这一点。如果我删除最后一组参数,后跟-rawtransfersettings
,我的脚本就可以正常工作。也就是说,open sftp://uname:pwd@abc.example.com/ -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx" -timeout=60 -rawsettings SendBuf=0 SshSimple=1
命令可以完美地工作。
我不确定如何继续这一步,因为我是一个新的命令脚本世界。
发布于 2019-04-16 04:17:33
WinSCP open
命令没有-rawtransfersettings
开关。
该开关属于文件传输命令,如get
、put
等。
具有相同错误消息但问题不同的其他问题:
https://stackoverflow.com/questions/55696465
复制相似问题