It worked! Thank you very much!
- registereduser
SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey
is working. Though it's indeed obsolete. You should use SessionOptions.SshHostKeyPolicy = SshHostKeyPolicy.GiveUpSecurityAndAcceptAny
.
SshHostKeyFingerprint
information provided.
SessionOptions sessionOptions = new SessionOptions
{ Protocol = Protocol.Sftp,
HostName = "ftp.N.com",
UserName = "N",
Password = "@#$%",
SshHostKeyFingerprint="ssh-rsa 2048 ....."
};
SshHostKeyFingerprint
I manfully (it changes daily) open WinSCP copy ssh info from it then paste it to our application. Is their a way to automatically accept new one? I look in to what you have on site but looks like some of thing obsoleted now. I tried to replace SshHostKeyFingerprint=""
with GiveUpSecurityAndAcceptAnySshHostKey = true
and GiveUpSecurityAndAcceptAnyTlsHostCertificate = true
. It did not work. Is it supposed to work the way I need it? Can someone point me to clear C# code which works?