SFTP Password problem in batch file

Advertisement

JLM
Joined:
Posts:
3
Location:
De

SFTP Password problem in batch file

My WinSCP Version is 5.15.1 (Build 9407)
In WinSCP-GUI (Example in the attachment) it works, but in batch-Script not

Example:
„internet-aaa.bbb.de“ is a proxy with password protection
„sftp.dis-boncult“ is the sftp-server I want to connect on

The Code-generator gives me only a version with one password
open sftp://user5,user5_jju@sftp.dis-boncult.de:Password1@internet-aaa.bbb.de/
but I need the password for the proxy too
open sftp://user5,user5_jju@sftp.dis-boncult.de:Password1@internet-aaa.bbb.de:Password2/
But it doesn't works. Can you please give me an example how I can solve this problem.
  • WinSCPGUI.PNG (37.44 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,943
Location:
Prague, Czechia

Re: SFTP Password problem in batch file

So how do you authenticate in the GUI? Please post a session log file for the GUI session.

Reply with quote

JLM
Joined:
Posts:
3
Location:
De

Re: SFTP Password problem in batch file

In the GUI the password for the proxy is stored in the field "Kennwort". After pressing the button "Anmelden" a Window-Dialog pops up and asking me to enter the sftp-server password.

But in batch-Script I get this error
...
2020-08-05 00:30:03.254 Sent password
. 2020-08-05 00:30:03.254 Password authentication failed
! 2020-08-05 00:30:03.254 Access denied
. 2020-08-05 00:30:03.254 Server offered these authentication methods: password
. 2020-08-05 00:30:03.254 Prompt (password, "SSH password", <no instructions>, "&Passwort:")
. 2020-08-05 00:30:03.254 Disconnected: Unable to authenticate

Reply with quote

JLM
Joined:
Posts:
3
Location:
De

Re: SFTP Password problem in batch file

In the Attachement you can find the session log file for the GUI session.
  • nZ2_wusr5,user5_jju@sftp.dis-boncult.de@internet-aaa.bbb.de.log (74.75 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,943
Location:
Prague, Czechia

Re: SFTP Password problem in batch file

OK, scripting does not support this.
This issue has been added to the tracker:
https://winscp.net/tracker/1928
You can vote for it there.

Meanwhile, you might be able to use input redirection to provide the second password:
echo password2| winscp.com /script=yourscript_with_passord2.txt

Reply with quote

Advertisement

You can post new topics in this forum