Topic "Complex password with special characters"

Author Message
Complex password

Guest


Hello all

I am trying to connect to a sFTP site and could not understand why I can connect without any problems using the GUI but the script failed. After much research and repeated trials, I cannot get this darn password to work in the script. The password is Vc%]=NBWX%85!@y@
I tried Vc%25]=NBWX%2585!@y@ (using the UTF-8 code) for %. No success, I then added %40 for the at sign, no success, I also adding the %21 for the ! (exclamation mark) no success

Any help would be appreciated.

Thanks
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
This works: Vc%25%5D%3DNBWX%2585%21%40y%40

Use Generate URL command next time:
https://winscp.net/eng/docs/ui_generateurl
falcrawl
[View user's profile]

Joined: 2015-10-07
Posts: 4
prikryl wrote:
This works: Vc%25%5D%3DNBWX%2585%21%40y%40

Use Generate URL command next time:
https://winscp.net/eng/docs/ui_generateurl


Using username "username".
Authenticating with pre-entered password.
Access denied.
Connection has been unexpectedly closed. Server sent command exit status 0.
Authentication log (see session log for details):
Using username "username".
Access denied.

Authentication failed.

This is the script I am using
open sftp://username:Vc%25%5D%3DNBWX%2585%21%40y%40@mysftp.com -hostkey="ssh-rsa 2048 f5:d9:20:a4:4b:45:62:7d:0c:0b:5d:d0:6e:b6:2f:22"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Then your password is not Vc%]=NBWX%85!@y@.

Enable password logging in GUI and inspect the log file to see an exact password that is used.
https://winscp.net/eng/docs/ui_pref_logging
falcrawl
[View user's profile]

Joined: 2015-10-07
Posts: 4
prikryl wrote:
Then your password is not Vc%]=NBWX%85!@y@.

Enable password logging in GUI and inspect the log file to see an exact password that is used.

https://winscp.net/eng/docs/ui_pref_logging


[I just logged in with WinSCP GUI and it work but failed with the script using Vc%]=NBWX%85!@y@

. 2015-10-21 10:02:08.863 --------------------------------------------------------------------------
. 2015-10-21 10:02:08.864 WinSCP Version 5.7.5 (Build 5665) (OS 10.0.10240 - Windows 10 Pro)
. 2015-10-21 10:02:08.864 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2015-10-21 10:02:08.864 Log level: Normal
. 2015-10-21 10:02:08.864 Local account: mydomain\myuser
. 2015-10-21 10:02:08.864 Working directory: C:\Program Files (x86)\WinSCP
. 2015-10-21 10:02:08.864 Process ID: 13908
. 2015-10-21 10:02:08.864 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe"
. 2015-10-21 10:02:08.864 Time zone: Current: GMT-4, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/8/2015, DST End: 11/1/2015
. 2015-10-21 10:02:08.864 Login time: Wednesday, October 21, 2015 10:02:08 AM
. 2015-10-21 10:02:08.864 --------------------------------------------------------------------------
. 2015-10-21 10:02:08.864 Session name: name (Modified site)
. 2015-10-21 10:02:08.864 Host name: myhost.com (Port: 22)
. 2015-10-21 10:02:08.865 User name: username (Password: Yes, Key file: No)
. 2015-10-21 10:02:08.865 Tunnel: No
. 2015-10-21 10:02:08.865 Transfer Protocol: SFTP (SCP)
. 2015-10-21 10:02:08.865 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-10-21 10:02:08.865 Disable Nagle: No
. 2015-10-21 10:02:08.865 Proxy: none
. 2015-10-21 10:02:08.865 Send buffer: 262144
. 2015-10-21 10:02:08.865 SSH protocol version: 2; Compression: No
. 2015-10-21 10:02:08.865 Bypass authentication: No
. 2015-10-21 10:02:08.865 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2015-10-21 10:02:08.865 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2015-10-21 10:02:08.865 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2015-10-21 10:02:08.865 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A,A
. 2015-10-21 10:02:08.865 Simple channel: Yes
. 2015-10-21 10:02:08.865 Return code variable: Autodetect; Lookup user groups: A
. 2015-10-21 10:02:08.865 Shell: default
. 2015-10-21 10:02:08.865 EOL: 0, UTF: 2
. 2015-10-21 10:02:08.865 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2015-10-21 10:02:08.865 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-10-21 10:02:08.865 SFTP Bugs: A,A
. 2015-10-21 10:02:08.865 SFTP Server: default
. 2015-10-21 10:02:08.865 Local directory: Z:\Cygwin\home\inbound\InBound, Remote directory: /, Update: Yes, Cache: Yes
. 2015-10-21 10:02:08.865 Cache directory changes: Yes, Permanent: Yes
. 2015-10-21 10:02:08.865 DST mode: 1
. 2015-10-21 10:02:08.865 --------------------------------------------------------------------------
. 2015-10-21 10:02:08.988 Looking up host "myhost.com"
. 2015-10-21 10:02:09.060 Connecting to 00.00.00.00 port 22
. 2015-10-21 10:02:09.270 Server version: SSH-2.0-mod_sftp/0.9.9
. 2015-10-21 10:02:09.271 Using SSH protocol version 2
. 2015-10-21 10:02:09.271 We claim version: SSH-2.0-WinSCP_release_5.7.5
. 2015-10-21 10:02:09.271 Doing Diffie-Hellman group exchange
. 2015-10-21 10:02:09.491 Doing Diffie-Hellman key exchange with hash SHA-256
. 2015-10-21 10:02:10.754 Verifying host key rsa2 0x23,0xc1b00fad6c1f2724 ceb2022885828425 c6a21c4f9daebf44 5bab9981d10126b2 e0cd9cafa05a0155 569409b27772ef13 cd8758eedff17f2b f59b3f5c05739fc5 5b1a2ded78405b18 57de4051421b09ae 86d8c14de658e253 3d6546ceb0f0dabe f9cb08658716993e 8e169c8479cfae73 2f4c47dbd10efa9a e239d5c54c206519 e71eccf50ee6a09d c1f758c5a1efb54d 7230533a2aa2fd80 19e649f1b9f00a03 b09b06059850f4ec 4a1e9c22e873be3b dbbecdc68cc88bdd c5fdcf7a4df285dc 1a630107c19fdc49 e95376674f1c5d92 6e269d4cc52dd7d4 4d8ecb8902deeb34 85a8b865c4a28d61 4bf9778e718e1be9 f7207b09c6f3c555 36b2442229b4f45f with fingerprint ssh-rsa 2048 f5:d9:20:a4:4b:45:62:7d:0c:0b:5d:d0:6e:b6:2f:22
. 2015-10-21 10:02:10.793 Host key matches cached key
. 2015-10-21 10:02:10.793 Host key fingerprint is:
. 2015-10-21 10:02:10.793 ssh-rsa 2048 f5:d9:20:a4:4b:45:62:7d:0c:0b:5d:d0:6e:b6:2f:22
. 2015-10-21 10:02:10.793 Initialised AES-256 SDCTR client->server encryption
. 2015-10-21 10:02:10.793 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2015-10-21 10:02:10.793 Initialised AES-256 SDCTR server->client encryption
. 2015-10-21 10:02:10.793 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2015-10-21 10:02:10.941 Using username "username".
. 2015-10-21 10:02:11.027 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2015-10-21 10:02:11.027 Using stored password.
. 2015-10-21 10:02:11.063 Sent password
. 2015-10-21 10:02:11.131 Access granted
. 2015-10-21 10:02:11.131 Opening session as main channel
. 2015-10-21 10:02:11.196 Opened main channel
. 2015-10-21 10:02:11.391 Started a shell/command
. 2015-10-21 10:02:11.419 --------------------------------------------------------------------------
. 2015-10-21 10:02:11.419 Using SFTP protocol.
. 2015-10-21 10:02:11.419 Doing startup conversation with host.
> 2015-10-21 10:02:11.473 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2015-10-21 10:02:11.564 Type: SSH_FXP_VERSION, Size: 138, Number: -1
. 2015-10-21 10:02:11.564 SFTP version 3 negotiated.
. 2015-10-21 10:02:11.564 SFTP versions supported by the server: 3
. 2015-10-21 10:02:11.564 Unknown server extension fsync@openssh.com="1"
. 2015-10-21 10:02:11.564 Unknown server extension posix-rename@openssh.com="1"
. 2015-10-21 10:02:11.565 Supports statvfs@openssh.com extension version "2"
. 2015-10-21 10:02:11.565 Unknown server extension fstatvfs@openssh.com="2"
. 2015-10-21 10:02:11.565 We believe the server has signed timestamps bug
. 2015-10-21 10:02:11.565 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 string are not mandatory
. 2015-10-21 10:02:11.565 Changing directory to "/".
. 2015-10-21 10:02:11.565 Getting real path for '/'
> 2015-10-21 10:02:11.565 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2015-10-21 10:02:11.652 Type: SSH_FXP_NAME, Size: 107, Number: 16
. 2015-10-21 10:02:11.652 Real path is '/'
. 2015-10-21 10:02:11.652 Trying to open directory "/".
> 2015-10-21 10:02:11.652 Type: SSH_FXP_LSTAT, Size: 10, Number: 263
< 2015-10-21 10:02:11.734 Type: SSH_FXP_ATTRS, Size: 37, Number: 263
. 2015-10-21 10:02:11.734 Getting current directory name.
. 2015-10-21 10:02:11.929 Listing directory "/".
> 2015-10-21 10:02:11.929 Type: SSH_FXP_OPENDIR, Size: 10, Number: 523
< 2015-10-21 10:02:12.024 Type: SSH_FXP_HANDLE, Size: 25, Number: 523
> 2015-10-21 10:02:12.024 Type: SSH_FXP_READDIR, Size: 25, Number: 780
< 2015-10-21 10:02:12.113 Type: SSH_FXP_NAME, Size: 136, Number: 780
> 2015-10-21 10:02:12.113 Type: SSH_FXP_READDIR, Size: 25, Number: 1036
< 2015-10-21 10:02:12.207 Type: SSH_FXP_STATUS, Size: 33, Number: 1036
< 2015-10-21 10:02:12.207 Status code: 1
> 2015-10-21 10:02:12.207 Type: SSH_FXP_CLOSE, Size: 25, Number: 1284
. 2015-10-21 10:02:12.207 username;d;0;2015-10-21T11:11:27.000Z;"Frameworkmi" [10001];"username" [10035];rwxrwx---;0
. 2015-10-21 10:02:12.280 Startup conversation with host finished.]
Guest




This is the same issue that I'm having. I was able to log in directly to WinSCP. However, I used the generate URL with password and username and I get the same error message.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
falcrawl wrote:
I just logged in with WinSCP GUI and it work but failed with the script using Vc%]=NBWX%85!@y@

The password logging is not enabled. Also post a script log file for comparison (use /loglevel=* to enable password logging).
Advertisements

You can post new topics in this forum






Search Site

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