Topic "Faild automatic connection with script"

Author Message
eduardo.ramos
[View user's profile]

Joined: 2017-11-14
Posts: 2
Location: Bahia/Brazil
Hi,

following [1], i´m scripting a automatized task, hiding credentials (windows permissions on .bat file).

But when I run the .bat file:

. 2017-11-14 15:55:53.618 Host key matches cached key
. 2017-11-14 15:55:53.618 Initialised AES-256 SDCTR client->server encryption
. 2017-11-14 15:55:53.618 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2017-11-14 15:55:53.618 Initialised AES-256 SDCTR server->client encryption
. 2017-11-14 15:55:53.618 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2017-11-14 15:55:53.659 Using username "tic".
. 2017-11-14 15:55:53.661 Server offered these authentication methods: publickey,password
. 2017-11-14 15:55:53.661 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2017-11-14 15:55:53.661 Using stored password.
. 2017-11-14 15:55:53.661 Sent password
. 2017-11-14 15:55:55.480 Password authentication failed
! 2017-11-14 15:55:55.480 Access denied
. 2017-11-14 15:55:55.481 Server offered these authentication methods: publickey,password
. 2017-11-14 15:55:55.481 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2017-11-14 15:55:55.481 Disconnected: Unable to authenticate

When I try to do through /command directly from command line, using the same URL session, works. As well as through GUI or using putty.

What can I be doing wrong?



[1] - https://winscp.net/eng/docs/guide_protecting_credentials_for_automation
Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
Enable password logging with /loglevel=* and verify that you are using a correct password.

If that does not help, please attach a full session log file from both scenarios.
eduardo.ramos
[View user's profile]

Joined: 2017-11-14
Posts: 2
Location: Bahia/Brazil
martin wrote:
Enable password logging with /loglevel=* and verify that you are using a correct password.

If that does not help, please attach a full session log file from both scenarios.


My password has special characters (@,=,/) and I´m encoding using %XX syntax.

To script mode, the open command is like that:
> 2017-11-16 15:24:09.352 Script: open scp://tic:***@cp-webapp07

Putting directly to prompt, looks like:
. 2017-11-16 15:36:52.619 Parameter: open scp://tic:passwordEncoded@cp-webapp07/
interactiveMode_WinSCP.txt (7.11 KB) [Download]

Description: (none)

scriptMode_WinSCP.txt (5.36 KB) [Download]

Description: (none)

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
I've asked you for /loglevel=*, but you have used /logleval=1
Advertisements

You can post new topics in this forum

Search

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