Re: I can´t connect with private key without password
Now i need a dll that works find with 32 bit
WinSCP .NET assembly works both in 32 and 64-bit.
Now i need a dll that works find with 32 bit
Well, so do what the message says.
Set theSessionOptions.SshHostKeyFingerprint
.
https://winscp.net/eng/docs/library_sessionoptions#sshhostkeyfingerprint
If you can login in GUI, it can generate a working code template for you:
https://winscp.net/eng/docs/ui_generateurl#code
SessionOptions.SshHostKeyFingerprint
.
SessionOptions sessionOptions = new SessionOptions();
sessionOptions.Protocol = Protocol.Sftp;
sessionOptions.HostName = "xxx.xxx.xxx.xxx";
sessionOptions.PortNumber = 22;
sessionOptions.UserName = "user";
sessionOptions.SshPrivateKeyPath = path
using (Session session = new Session())
{
try
{
session.Open(sessionOptions);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}