Topic "How to avoid prompt for password if public key was rejected"

Author Message
Kotik
[View user's profile]

Joined: 2011-08-22
Posts: 4
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?
Advertisements
Kotik
[View user's profile]

Joined: 2011-08-22
Posts: 4
Is this a stupid question or nobody knows the answer?
It's OK to say it is stupid and why.
Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25014
Location: Prague, Czechia
The prompt should timeout in 10 seconds. What version of WinSCP are you using?
Kotik
[View user's profile]

Joined: 2011-08-22
Posts: 4
We are using version 4.2.7
Kotik
[View user's profile]

Joined: 2011-08-22
Posts: 4
So, is not supported in 4.2.7 and can not be configured?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25014
Location: Prague, Czechia
No, please make sure you are using the latest stable version.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License