Topic "How to confirm verified host key by automating script?"

Author Message
Norman

Guest


Hi all,

I'm wrting a automating script to download some files from a SFTP. My problem is if user runs this script for the first time, there would be a confirmation whether to accept verified host key from server. And as batch mode on, I think the script would use "Abort" by default, am I correct?

How could I confirm accepting this verified host key by script?

Besides, I've another question. It seems that in script, winscp3 distinguish upper case and lower case. In winscp3 console, I type "cd a_folder" or "cd A_folder", which are both ok. But in script, if the folder name on SFTP is "a_folder", then "cd A_folder" would fail, saying that folder not found. Is it the way winscp3 works during automating script?

Many thanks,


Norman
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Yoiu can distribute an INI file with confirmed key with your script.
_________________
Martin Prikryl
JamesPicken

Guest


Could you go into some detail about how to do this, as I am having the same problem.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
JamesPicken wrote:
Could you go into some detail about how to do this, as I am having the same problem.

Switch configuration to INI file. Verify the host key by logging in manually. Then take the created INI file and run the scripts with it (using /INI switch).
_________________
Martin Prikryl
Cam
[View user's profile]

Joined: 2006-06-12
Posts: 1
Hello

I have a definite need for the automatic accepting of new host keys. Basically I'm in a situation in which I am stuck with using SCPY and have over 100 new units a day that need a unique configuration file loaded onto the system. I am currently using a command line call from "Labview" and it will hang. If I manually run the command I can accept the new key and then run my automation. However I can't support this going forward.

Has anyone had this issue? Can you sugggest a way I can make this work in a fully automated fashion?

Thanks Cam
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Cam wrote:
I have a definite need for the automatic accepting of new host keys.

Then you can stop using SSH altogether. With automatic accepting host keys, it brings you no security, only increases CPU consumption and slows down transfers.
_________________
Martin Prikryl
Guest




Unfortunately the SSH is built into the units I am copying into. I have no other option other than request the supplier modify their software which would be a large undertaking
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