Reputation: 1575
I am using C# WinSCP library. While connecting, it gives me error that fingerprint I am using is not correct. However that is the correct one. And when I run the same function again, it runs and gets connected. So some time it connects and sometime it gives this error.
Host key does not match configured key fingerprint "ssh-rsa 2048 tam1gcQz/oPD4oNxxxxxxxxxxxxxWlycEao88="! Host key fingerprint is ssh-rsa 2048 Jh0zxfQo69gvHBdexxxxxxxxx5uzEkij8IOpSk=.
If I use the fingerprint which it suggests, it gives the same error telling me that the other fingerprint is the correct one. Is it because of fingerprint that has slash? But the other one does not have a slash in it.
Upvotes: 0
Views: 941
Reputation: 202494
Without log files from both the successfull and failed connection I can only guess that you are connecting to a load balanced IP address that randomly routes you to different backend SSH/SFTP server.
If that's the case, you will need to list fingerprints of all backend servers in your code (semicolon separated).
Another option is that you are under an interminent MITM attack.
Upvotes: 1