Topic "Automate script without check on fingerprint"

Author Message
saker
[View user's profile]

Joined: 2016-10-04
Posts: 1
Location: Egypt
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 ??
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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"""
Saker1

Guest


Hello Martin,

Thanks for your support.

is there any way to ignore the fingerprint check ????
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Show us your complete script with the -hostkey switch.
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