Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

No, please make sure you are using the latest stable version.
Kotik

So, is not supported in 4.2.7 and can not be configured?
Kotik

We are using version 4.2.7
martin

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?
Kotik

Is this a stupid question or nobody knows the answer?
It's OK to say it is stupid and why.
Thanks
Kotik

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?