Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

skaterkfbs

Sorry should have turned on echo to see what was actually happening. I moved the option commands to the beginning of the list of commands and changed the incorrect "option continue on" to the correct "option batch continue".. All seems to be working now. Thanks for you time.
skaterkfbs

Trouble passing HostKey in command line

I am using WinSCP Version 4.1.8. I am trying to connect to an SFTP-2 server and have the host key automatically used. I would imagine that this would work quite easy if we were using a script file, but I am limited to just a command line call, not creating a extra file. Below is the command I am trying to run, but it seems to be an issue with the quotes around the open command and the hostkey.

winscp418.exe /console /command "open sftp://user:pass@server -hostkey="ssh-rsa 1024 5a:1e:d3:13:7c:1b:81e8:c2:09:7e:1e:34:a5:f1:5d"" "option continue on" "option confirm off" "option transfer binary" "put C:\somefile.ext /path/to/file/somefile.ext" "close" "exit"

I have tried the following methods:
hostkey=ssh-rsa 1024 5a:1e:d3:13:7c:1b:81e8:c2:09:7e:1e:34:a5:f1:5d
hostkey="ssh-rsa 1024 5a:1e:d3:13:7c:1b:81e8:c2:09:7e:1e:34:a5:f1:5d"
hostkey=\"ssh-rsa 1024 5a:1e:d3:13:7c:1b:81e8:c2:09:7e:1e:34:a5:f1:5d\"
hostkey=^"ssh-rsa 1024 5a:1e:d3:13:7c:1b:81e8:c2:09:7e:1e:34:a5:f1:5d^"
hostkey=""ssh-rsa 1024 5a:1e:d3:13:7c:1b:81e8:c2:09:7e:1e:34:a5:f1:5d""

Does anyone know of a way to get this working?
I am using Windows XP SP3.