I'm currently creating an SSIS package where I need to connect to a secure server to copy some files and I would like to validate the connection via the public key fingerprint the server sends.
I'm not very familiar in this area, can I always expect there to be a fingerprint sent when connecting?
The package previously used WinSCP, and a fingerprint was baked into the code in the format of ssh-dss 1024 [hex representation]
. I assume this format is taken from PuTTY, because that's how I see it while connecting to a new server and it's asking me to verify. WinSCP took this as is and handled the verification.
I'm planning to switch to SSH.NET and its mechanism requires me to check the fingerprint by hand. Can I verify the connection based on just the hex, or do I need to also check the key length and the algorithm used?