How to confirm verified host key by automating script?

Advertisement

Norman
Guest

How to confirm verified host key by automating script?

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,252
Location:
Prague, Czechia

Re: How to confirm verified host key by automating script?

Yoiu can distribute an INI file with confirmed key with your script.
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,252
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

Reply with quote

Cam
Joined:
Posts:
1

How to confirm verified host key by automating script..2

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,252
Location:
Prague, Czechia

Re: How to confirm verified host key by automating script..2

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

Reply with quote

Guest

Re: How to confirm verified host key by automating script..2

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

Reply with quote

Advertisement

You can post new topics in this forum