Faild automatic connection with script

Advertisement

eduardo.ramos
Joined:
Posts:
2
Location:
Bahia/Brazil

Faild automatic connection with script

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,378
Location:
Prague, Czechia

Re: Faild automatic connection with script

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.

Reply with quote

eduardo.ramos
Joined:
Posts:
2
Location:
Bahia/Brazil

Re: Faild automatic connection with script

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/

Reply with quote

Advertisement

You can post new topics in this forum