Topic "unable to get the -hostkey=* option to work"

Author Message
acemaxx
[View user's profile]

Joined: 2013-12-18
Posts: 2
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
The -hostkey=* is supported since 5.2 only:
https://winscp.net/tracker/show_bug.cgi?id=815

Make sure you understand that you are loosing all security by using this!
_________________
Martin Prikryl
acemaxx
[View user's profile]

Joined: 2013-12-18
Posts: 2
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.
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