Too Many parameters for command 'open' please help

Advertisement

walkerk
Guest

Too Many parameters for command 'open' please help

when running my script that have RSA host key i get the following error message
the Script from command line using WINSCP.com /script=ICEChatChatCopy.txt
What am i doing work with the open cmd? Please Help!

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open sftp://# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open sftp://userid:password@mft.theice.com/ -hostkey=“ssh-rsa 1024 05:14:b6:0f:9f:f5:b9:7b:78:e4:dd:6c:2f:f3:8e:d8”
# Change remote directory
cd /compliance
# Force binary mode transfer
option transfer binary
# Download file to the local directory C:\ChatTest
get xcelenergy_20*.xml C:\ChatTest
# Disconnect
close:xcel4vantage$$@mft.theice.com/ -hostkey=“ssh-rsa 1024 05:14:b6:0f:9f:f5:b9:7b:78:e4:dd:6c:2f:f3:8e:d8”
# Change remote directory
cd /compliance
# Force binary mode transfer
option transfer binary
# Download file to the local directory C:\ChatTest
get xcelenergy_20*.xml C:\ChatTest
# Disconnect
close

Description: this is a print scrren off the error.

errorsftpscript.PNG

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Too Many parameters for command 'open' please help

The problem is that you did not use quotation mark " (U+0022) around -hostkey value, but left/right double quotation marks “” (U+201C and U+201D). WinSCP (and any other command-line tool I know of) does not recognize these.

Reply with quote

Query
Guest

Re: Too Many parameters for command 'open' please help

The same problem ,I also face," Too Many parameters for command 'open' ".Still I can't figure out that.Even While I omit 'Host-key' part,Error skips.But struck further.
Can I create,hostkey or SSH key by Pageant/Puttygen key generator.than use it in Command.Or while connecting with OPEN command,Remote PC will automatically share the SSH key for authentication.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Too Many parameters for command 'open' please help

Query wrote:

The same problem ,I also face," Too Many parameters for command 'open' ".Still I can't figure out that.Even While I omit 'Host-key' part,Error skips.But struck further.
Can I create,hostkey or SSH key by Pageant/Puttygen key generator.than use it in Command.Or while connecting with OPEN command,Remote PC will automatically share the SSH key for authentication.
Unless you provide more details (the script itself) I can only point you to:
https://winscp.net/eng/docs/faq_script_switch

Reply with quote

Advertisement

You can post new topics in this forum