How to avoid prompt for password if public key was rejected
My script looks like this:
option batch on
option batch abort
option confirm off
option echo off
open ABC
put -nopermissions -nopreservetime *.txt /ABC/
close
exit
But when my public key is rejected (for whatever reason) apparently I get prompted for password:
Here is part of the log:
2011-08-22 03:07:46.724 Reading private key file "D:\Program Files\PrivateKey..ppk"
! 2011-08-22 03:07:46.724 Using username "id".
. 2011-08-22 03:07:48.739 Offered public key
! 2011-08-22 03:07:49.177 Server refused our key
. 2011-08-22 03:07:49.177 Server refused public key
. 2011-08-22 03:07:49.177 Prompt (6, SSH password, , &Password: )
How can I prevent this from happening and error out immediately?
option batch on
option batch abort
option confirm off
option echo off
open ABC
put -nopermissions -nopreservetime *.txt /ABC/
close
exit
But when my public key is rejected (for whatever reason) apparently I get prompted for password:
Here is part of the log:
2011-08-22 03:07:46.724 Reading private key file "D:\Program Files\PrivateKey..ppk"
! 2011-08-22 03:07:46.724 Using username "id".
. 2011-08-22 03:07:48.739 Offered public key
! 2011-08-22 03:07:49.177 Server refused our key
. 2011-08-22 03:07:49.177 Server refused public key
. 2011-08-22 03:07:49.177 Prompt (6, SSH password, , &Password: )
How can I prevent this from happening and error out immediately?