I have a program section like this. However, I get an error on SshHostKeyFingerprint
.
I don't understand what is supposed to go in here. When I use the WinSCP program and enter the credentials, everything works fine.
var host = "sftp.xxx.xx.com";
var uname = "auser";
var passwd = "apasswd";
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = host,
UserName = uname,
Password = passwd,
SshHostKeyFingerprint = "ssh-rsa 2048 =@" + host
};
Session session = new Session();
session.Open(sessionOptions);