Automate script without check on fingerprint

Advertisement

saker
Joined:
Posts:
1
Location:
Egypt

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

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.

Reply with quote

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
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"""

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum