Using scriptfile will not log on. Keeps prompting for PW

Advertisement

PoulJ
Guest

Using scriptfile will not log on. Keeps prompting for PW

Hi,

Even though password is specified in scripts open command I must enter password manually in order to log on. GUI works as expected.

Command:
------------
winscp.exe /console /script="d:\Programmer\WinSCP\command.txt"

Script - command.txt:
------------------------
option batch on
option confirm off
open sftp://USERNAME:Pasword@host:10022 -privatekey="C:\keystore\PuTTY\id_rsa.ppk" -hostkey="ssh-dss 2048 31:2a:18:3b:90:fe:20:a8:83:e9:3f:1f:90:78:e6:ef"
pwd
close
exit

I should mention that private key has been converted by PuTTY from DSA to RSA.

Cheers,
/Poul

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,552
Location:
Prague, Czechia

Re: Using scriptfile will not log on. Keeps prompting for PW

Why do you put in password, when you are authenticating using private key?

Reply with quote

PoulJ
Guest

Sorry my bad.

Removing the PW from the open command does not change anything. Still being prompted for the password.

I now note that when using GUI I also need to enter Passphrase even though I have saved the Passphrase with the session.

So it maybe a general problem ?

/Poul

Reply with quote

PoulJ
Guest

Problem solved.

Use puttygen.exe to save the private key withouth passphrase.

I know this is not the safest thing to do, but client wants it this way !

Reply with quote

Advertisement

You can post new topics in this forum