Re: SshHostKeyFingerprint and SFTP
Sorry, I honestly believe that most of your question are already answered in the FAQ you already know. Please read it again carefully.
When you connected the first time, WinSCP asked you to confirm the host key:
https://winscp.net/eng/docs/ssh_verifying_the_host_key
Whether you really validated the host key at that moment is another question (and I guess you did not). The
Anyway, if you trust your connection, then just follow the last section in the FAQ that tells you how to reuse the host key you "have validated" in the GUI.
https://winscp.net/eng/docs/faq_hostkey#automation
When I connect using the WinSCP UI I simply enter the Host, Username, and Password and I'm in without an issue. Shouldn't C# code function relatively the same?
When you connected the first time, WinSCP asked you to confirm the host key:
https://winscp.net/eng/docs/ssh_verifying_the_host_key
Whether you really validated the host key at that moment is another question (and I guess you did not). The
SessionOptions.SshHostKeyFingerprint
is the code equivalent of this GUI confirmation.
Anyway, if you trust your connection, then just follow the last section in the FAQ that tells you how to reuse the host key you "have validated" in the GUI.
https://winscp.net/eng/docs/faq_hostkey#automation