Topic "host key in batch"

Author Message
MTecknology
[View user's profile]

Joined: 2007-07-19
Posts: 2
I understand that the host key is important to the security of ssh. However it is causing me many problems. I have logged in with the GUI and accepted the key. When I try to run my script, I get an error in the log saying the host key wasn't verified.

I NEED a way to run this without any verification.

I work in at a school with about 5-600 machines. I have a file server specifically set up to backup a users data. On a USB drive I have a batch file that executes this command. -> winscp403.exe /console /ini=C:\WINDOWS\Temp\winscp382.ini /script=winscpscript.txt

------This is the end of the log file it created------
. 2007-07-19 13:50:59.874 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2007-07-19 13:50:59.874
. 2007-07-19 13:50:59.874 Continue connecting and add host key to the cache? ()
. 2007-07-19 13:50:59.890 Attempt to close connection due to fatal exception:
* 2007-07-19 13:50:59.890 Host key wasn't verified!
. 2007-07-19 13:50:59.890 Closing connection.


The idea is to be able to backup the persons data with minimal effort. (Just plug in a USB drive and double click the batch file.

Going around and tweaking every system in all three buildings would be a major pain in the ass so I either need a way around this issue or I'm going to need an alternative to WinSCP...

Any ideas on how to force it to confirm with(Y) every time it asks me someting?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
If you accept the key (either in GUI or script) while using an INI file, the key gets stored into the INI file. So then, whereever you run your script with the INI file, the key is known already.
_________________
Martin Prikryl
MTecknology
[View user's profile]

Joined: 2007-07-19
Posts: 2
It doesn't appear to work fully... I have it stored in the ini file but I believe I found the registry key where the other piece is stored. It won't be a big deal to merge a .reg file b4 running the batch so I think that's a good enough solution. I'll mess around with it more to find the most ideal solution since I'm always doing that though.

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
MTecknology wrote:
It doesn't appear to work fully... I have it stored in the ini file but I believe I found the registry key where the other piece is stored.

That's not how it works. You may have in both places, but the place that's actually used matters only.
_________________
Martin Prikryl
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