add hostkey to command line in batch file?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm working on a automated batch job to pull specific files off a
server.  I'm facing a problem where the host key prompt is hanging the
batch process.  I've read on ( /
~sgtatham/putty/faq.html) that the right way to fix it is to add the
correct host key to the Registry in advance.  I went into
HKEY_CURRENT_USER/software/SimonTatham/Putty/SshHostKeys in the
registry editor and saw that the name, type, and data does exist for
the host I'm trying to connect to.

My question is what command line would I have to place in the batch
file so I can connect to this server?
I've used this prior with psftp, but would I need to add the hostkey
or a call to the hostkey to this line using putty.exe?:
C:\Apps\Putty\putty.exe -ssh -pw password -b

Or would I need to use plink or similar?


Re: add hostkey to command line in batch file?

On Jun 9, 1:07=A0pm, wrote:
Quoted text here. Click to load it

If you are just transferring files try using pscp.

Site Timeline