I know this question was asked several times in several ways, for example:
However, none provided the answer I was hoping to find (I think...).
I'm working with a specific cloud provider where I generate a private/public key for SSH authentication . I upload the public key to the cloud instances store the private key on the client side. When I want to SSH to the cloud instances, I use the private key to open the SSH connection. By doing so, the server authenticates the client.
What prevents from a MITM attacker, that knows the public key to hijack my connection and spoof the server? All he needs is the public key, right?
I don't understand how the fingerprint validation helps in this case. Unless, there is another pair of public/private keys which can be used solely for the purpose of the server's authentication by the client.
Thanks
/etc/ssh/ssh_host_*... – ThoriumBR Nov 11 '15 at 14:22authorized_keysfile in the userś home). It sends a challenge, the client signs it with the private key, server checks the signature against the public key it already have. The key isn't transmitted during authentication. – ThoriumBR Apr 11 '22 at 12:38.ssh/authorized_keysto check if the key is authorized, and checks if the signature on the challenge matches. – ThoriumBR Apr 13 '22 at 16:04.ssh/authorized_keysto conform whether it is authorized or not. Then if the public key is the authorized one, it will send the challege to the client encrypted by the public key.Is this how it works?
– Apr 14 '22 at 00:21