add hostkey to command line in batch file? - SSH
This is a discussion on add hostkey to command line in batch file? - SSH ; Hello,
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 ( http://www.chiark.greenend.org.uk/
~sgtatham/putty/faq.html) that the right way to ...
-
add hostkey to command line in batch file?
Hello,
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 (http://www.chiark.greenend.org.uk/
~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 hostname.com -pw password -b
someother.scr
Or would I need to use plink or similar?
Thanks,
Awakash
-
Re: add hostkey to command line in batch file?
On Jun 9, 1:07*pm, awak...@gmail.com wrote:
> Hello,
>
> 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 (http://www.chiark.greenend.org.uk/
> ~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 hostname.com -pw password -b
> someother.scr
>
> Or would I need to use plink or similar?
>
> Thanks,
> Awakash
If you are just transferring files try using pscp.