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

Re: SFTP Password problem in batch file

Please try the latest version of WinSCP.

If this does not help, I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
JLM

Re: SFTP Password problem in batch file

I have added the log file in the Attachement
martin

Re: SFTP Password problem in batch file

Please attach a complete session log file.
JLM

Re: SFTP Password problem in batch file

I have tried your suggestion. But it doesn't work for me. In the script-file (open...) it is not possible to grab the password from the command line. I can't provide the password for "further authentication". Can you please explaion me how to provide the password2 in the script file.

Snippet from Log-File:
Prompt (password, "SSH password", <no instructions>, "&Passwort:")
. 2021-02-09 16:13:52.760 Using stored password.
. 2021-02-09 16:13:52.760 Sent password
! 2021-02-09 16:13:53.072 Further authentication required
. 2021-02-09 16:13:53.072 Further authentication required
. 2021-02-09 16:13:53.072 Server offered these authentication methods: passwordXX,ˆXXXXXXXXXXXXXXXXXXXXXXXXXXXXXi
. 2021-02-09 16:13:53.072 Prompt (password, "SSH password", <no instructions>, "&Passwort:")
. 2021-02-09 16:13:53.072 Disconnected: Unable to authenticate
martin

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
JLM

Re: SFTP Password problem in batch file

In the Attachement you can find the session log file for the GUI session.
martin

Re: SFTP Password problem in batch file

Please attach a full log file.
JLM

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
martin

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.
JLM

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.