Topic "Too Many parameters for command 'open' please help"

Author Message
walkerk

Guest


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
errorsftpscript.PNG (24.35 KB)

Description: this is a print scrren off the error.

errorsftpscript.PNG

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
Query

Guest


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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License