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: Automate script without check on fingerprint

@Saker1: That's what the -hostkey=* is for, as shown above.
Saker1

Hello Martin,

Thanks for your support.

Is there any way to ignore the fingerprint check?
martin

And where's the -hostkey switch?

It should be like:
WinSCP.com /command "option transfer ascii" "open sftp://USER@10.10.10.10/ -hostkey=*" ...

(Note that the "option batch abort" "option confirm off" are not needed anymore in the recent versions of WinSCP).

Though, when connecting to a cluster of servers, you should simply list all their fingerprints, instead of blindly accepting any.
"open sftp://USER@10.10.10.10/ -hostkey=""ssh-dss 1024 key1;ssh-dss 1024 key2;ssh-dss 1024 key3"""
Guest

Hello Martin,

sorry for being late. please find below the script
cd C:\
cd program files (x86)
cd WinSCP
WinSCP.com /command "option batch abort" "option confirm off" "option transfer ascii" "open sftp://USER@10.10.10.10" "get -delete /PATH/*.lst D:\PATH\" "exit" /privatekey=D:\keyfile.ppk

This script connect to cluster servers, so may be fingerprint changes every while, so I need this script to ignore the fingerprint check.
martin

Re: Automate script without check on fingerprint

Show us your code and session log file.

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
saker

Automate script without check on fingerprint

Dears,
I need to make an automatic script to connect to servers and don't check on a fingerprint key.

Script created on Windows.
And I try to use "/hostkey="*" & -hostkey="*" and it doesn't work.

Any help?