error in generated c# code (mistake between Password and PrivateKeyPassphrase)
When researching logs and doc I found mistake in generated c# code:
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "blablalab.com",
PortNumber = 22,
UserName = "whatever",
Password = "complicatedpassword",
SshHostKeyFingerprint = "dont care",
SshPrivateKeyPath = @"C:\temp\my_private_key.ppk",
};
should have been
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "blablalab.com",
PortNumber = 22,
UserName = "whatever",
PrivateKeyPassphrase = "complicatedpassword",
SshHostKeyFingerprint = "dont care",
SshPrivateKeyPath = @"C:\temp\my_private_key.ppk",
};
After correcting, c# code now runs fine...
Now you just need to correct in WinSCP for future usage !?