Post a reply

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)


Topic review


Thank you, I upgraded and then was getting an error about use open command instead of deprecated command line parameter, that was interesting because I was trying to use the open command but I found another thread in the forum where you linked another support page, and that resolved the connection and file transfer problems.


Re: unable to connect - open command has too many arguments


If that does not help, please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

unable to connect - open command has too many arguments

Hello, I'm trying to setup a connection for POC that I'll then modify so that it connects to an external vendor and retrieves a file for us. I looked through some recent posts and saw similar questions but it didn't look like they applied exactly. I've been using the open command page and the session url, and useful scripts pages for assistance on the command and syntax. Here's the error I'm getting...

I have connected to this host with the gui so I know connectivity works from host a to host b, and that it's not the first time they've shared files...

File (currently):
option batch abort
option confirm off
open s -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
get "test.txt" "C:\Program Files\Winscp\test.txt"

Error (before -hostkey argument):
C:\Program Files\Winscp> /script=test.txt
batch abort
confirm off
Searching for host...
Connecting to host...
The server's host key was not found in the cache. You have no guarantee that the
server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
If you trust this host, press Yes. To connect without adding host key to the cac
he, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache?
(Y)es, (N)o, (C)ancel: Cancel
Host key wasn't verified!
Authentication failed.

C:\Program Files\Winscp>

Error after using the -hostkey

C:\Program Files\Winscp> /script=test.txt
batch abort
confirm off
Too many parameters for command 'open'.

C:\Program Files\Winscp>