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: Creating Session Object with Encrypted password

There's no way so safely encrypt password in a way that still allow automation.

All we can do to introduce some obfuscation. But you can do that on your own.
ddicroce

Creating Session Object with Encrypted password

I would like to know if it is possible to create the Sesson object and use the encrypted password for the password to avoid having a clear text password in my source code.

SessionOptions sessionOptions = new SessionOptions
{Protocol = WinSCP.Protocol.Sftp,
HostName = "server",
UserName = "user",
Password = "[i]encryptedpassword@",[/i]
PortNumber = 22,
SshHostKeyFingerprint = "ssh-rsa xxxx xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
};