How to avoid prompt for password if public key was rejected

Advertisement

Kotik
Joined:
Posts:
4

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: How to avoid prompt for password if public key was rejected

The prompt should timeout in 10 seconds. What version of WinSCP are you using?

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum