0

I am using psftp to make connection between windows and linux to transfer files.

psftp.exe user@host -pw hello -v -bc -batch 

However, in case of a new host above results in error:

Cannot confirm a host key in batch mode
FATAL ERROR: Cannot confirm a host key in batch mode

I want to remove StrictHostKeyChecking for this. Such as -o StrictHostKeyChecking=No in ssh or normal sftp command.

However passing -o doesn't work with psftp.

psftp.exe user@host -pw hello -v -bc -batch -o StrictHostKeyChecking=no
psftp: unknown option "-o"
       try typing "psftp -h" for help

So, how can I pass ssh_options such as this, while using psftp?

1

1 Answer 1

3

The StrictHostKeyChecking is an OpenSSH directive/option. It has nothing to do with psftp or any other PuTTY tool.

PuTTY tools actually do not have any option equivalent to OpenSSH StrictHostKeyChecking=no. And it's an insecure thing to do anyway.

The way to go, is either to cache the host key, or use -hostkey switch to specify a fingerprint of the expected/trusted host key.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .