WinSCP“命令'open'的参数太多."错误 [英] WinSCP "Too many parameters for command 'open'." error

查看:108
本文介绍了WinSCP“命令'open'的参数太多."错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下命令连接到SFTP,以将所有.csv文件从一个位置移动到另一个位置,并且出现命令'open'的参数过多." 错误.

I am trying to connect to an SFTP with the following command to move all .csv files from one location to another and I'm getting the "Too many parameters for command 'open'." error.

option echo off
option batch on
option confirm off
open sftp://XXX@XXX.com/ —hostkey="ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX" —rawsettings ProxyMethod=3 ProxyHost=proxy.uk.XXX.com
cd /XX/XX/XX/IN/LOAD
lcd \\XX.local\EMEA\XX\XX\Import_Location
put *.csv -nopreservetime=on -nopermissions=on
exit

由于在高速缓存中未找到服务器的主机密钥" 错误,我添加了—hostkey参数,批处理文件在此之前运行良好,但是我想更正主机关键错误.

I added the —hostkey parameter due to the "The server's host key was not found in the cache" error, the batch file was working fine before that, but I want to correct the host key error.

我检查了所有破折号,引号,这是我唯一的我很困惑的是hostkey参数是否正确. WinSCP 上的在线信息以及一些论坛上说您必须使用SHA-256指纹仅主机密钥,它与MD5详细信息XX:XX:XX:XX....的格式不同.

I checked all the dashes, the quotes, the only thing I'm confused about is whether the hostkey parameter is correct. The information online on WinSCP and some forums says you have to use SHA-256 fingerprint of the host key only which is a different format to the MD5 detail XX:XX:XX:XX.... Please can you help which one it is?

—hostkey="ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX"

OR

—hostkey="ssh-rsa 2056 AbC50IDzyx.....="

是与我类似的查询,但我看不出有什么区别,因此它们的工作原理与我的不同.谢谢.

This is a similar query to mine, but I cannot see what the difference is so that theirs works and mine doesn't. Thank you.

推荐答案

—hostkey—rawsettings开头的符号不是简单的

The symbol you have at the beginning of —hostkey and —rawsettings is not a simple hyphen-minus (-), but em-dash ().

请使用连字符减号(-)–在标准英语[和其他]键盘上的破折号是什么.

Please use hyphen-minus (-) – what is the dash that you find on the standard English [and other] keyboards.

或更简单的是,让 WinSCP GUI为您生成脚本模板.

实际上,您遇到的问题与 WinSCP论坛发布中的问题完全相同提到.

其他错误消息相同但问题不同的问题:

这篇关于WinSCP“命令'open'的参数太多."错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆