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

martin

Re: Using saved SSH keys for WinSCP.com (SFTP Scripting)

josegrande wrote:

we have about 20 different servers throughout the country. I could write a bunch of if statements in the batch file and include each and every fingerprint

What do you need "if" statements for? Include host keys along with the other connection info in your batch file.

Now doing so, it will used Cached keys, but also now it will ask for unknown hosts.

The latest version of WinSCP aborts a script, if it sees an unknown hostkey. You must be using some old version of WinSCP.
josegrande

Re:

No one answered, but I found the answer out of curiosity.

You must specify the ini ANNND use -hostkey="".

If the host key isn't in the init, it will try to use the specified host key, and since the specified host key if blank, it will fail telling you they "Don't Match".
josegrande

RE;

Okay, I found that you must use the \ini= option for registry or \ini=\File.ini for .ini.

Now doing so, it will used Cached keys, but also now it will ask for unknown hosts. Can I get it to automatically disconnect if it finds an unknown host? I don't want users to blindly accept not knowing what it's asking.
josegrande

Using saved SSH keys for WinSCP.com (SFTP Scripting)

I am writing a batch file to allow use of SFTP for some of our employees.

Can the automation with WinSCP.com use the saved SSH keys from the WinSCP.exe GUI for authentication?

we have about 20 different servers throughout the country. I could write a bunch of if statements in the batch file and include each and every fingerprint, but
ideally, it would be nice to have it access that .ini file (or registry) for the keys.