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

acemaxx

Re: unable to get the -hostkey=* option to work

My apologies, I thought I downloaded the latest version from your site yesterday. Somehow I ended up with version 5.1.8. I have version 5.5.0 now. Thank you for your reply.
martin

Re: unable to get the -hostkey=* option to work

The -hostkey=* is supported since 5.2 only:
https://winscp.net/tracker/815

Make sure you understand that you are loosing all security by using this!
acemaxx

unable to get the -hostkey=* option to work

I am running WinSCP version 5.1.8 and am trying to use the following command in a batch file

winscp.exe /console /command "option batch on" "option confirm off" "open sftp://root:MyPasswordHere@ServerNameHere/tmp -hostkey=*" "put D:\Some\File\OnThe\Server.txt" "exit"

I have also tried a variety of quote marks, like this

winscp.exe /console /command "option batch on" "option confirm off" "open sftp://root:MyPasswordHere@ServerNameHere/tmp -hostkey="*"" "put D:\Some\File\OnThe\Server.txt" "exit"

And this, which I found in a post on this forum

winscp.exe /console /command "option batch on" "option confirm off" "open sftp://root:MyPasswordHere@ServerNameHere/tmp -hostkey=""*"" "put D:\Some\File\OnThe\Server.txt" "exit"

None of these work, the script still stops and prompts to accept the new host key. If I manually accept the host's key and save it in the cache, then run the script again it works fine.