Ssh – Force Unix SFTP to use public key only and not to use other authentication method

public-keyssh

Is it possible to force SFTP to use the configured public key only and not to proceed to other authentication method like password auth on failure to authenticate using public key? the PasswordAuthentication no in sshd_config is not possible as the user is also being used during putty & winscp connection. Thank you in advance!

Best Answer

Thank you all for your replies. Instead of adjusting the sshd_config file. I just added the -oBatchMode=yes in the SFTP command in the shell script and I think it worked for me.

Related Topic