Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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
Query

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.
martin

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.
walkerk

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