Topic "Special Characters in Password"

Author Message


I have been given a rather difficult password by one of our suppliers to sftp from an offsite server.

I am trying to use assembly and powershell to connect and I have tested successfully to our own server but looking at the debug log shows its not escaping the special characters in the password - can anyone help?

For arguments sake the password (not the real one) is Tynf^&f34%cvBN

when viewed in the debug log this is being changed to Tynf%5E%26f34%25cvBN

I have tried wrapping the password in double quotes ("Tynf^&f34%cvBN"), single quotes, ive tried replacing the special characters with %25 as in session url but this just translates the % character and the number.

I'm using winscp version and have been browsing through posts on here for hours so any help is appreciated.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
You should not need to do anything with the password in the .NET assembly. Just assign it as is. Of course, except for symbols which have special meaning in your programming language.

If you have problems, try to enable password logging by calling session.AddRawConfiguration("Logging\LogSensitive", "1") and inspect the log.

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License