0

Possible ways of SSH server authentication are:

  1. Server public key fingerprint verification
  2. Implicit authentication
  3. Explicit authentication

In case of fingerprint verification everything runs on trust and there is no way to prove the server's authenticity.

In implicit authentication the client waits for initial response before sending further data. However, if the public key is already changed by a man in middle then this initial response would could come from this middle man and further communication is compromised.

In case of explicit authentication we have signature alongwith key. What if a middle man replaces both the public key and signature. Yet again the communication is compromised.

Also there are no certificates involved. Is there no solid way to authenticate the server in SSH?

I might be having some understanding gaps, so clarifications are always welcome.

  • "I might be having some understanding gaps, so clarifications are always welcome." - I believe this is actually the case. Server authentication is done based on the public key, which the client verifies on the initial connection against a known value which got exchanged before via a secure channel (i.e. client knows what public key or fingerprint should be). And, one can actually use PKI with SSH too for a more scalable approach. – Steffen Ullrich Aug 10 at 18:28
  • Via a secure channel? What exactly is this secure channel? – Navjot Waraich Aug 10 at 18:30
  • "What exactly is this secure channel?" - depends on the specific environment. For example if the client has setup the server he knows which pubkey to expect. – Steffen Ullrich Aug 10 at 18:31
  • 1
    The exchange of key to the user, not the client, should happen out-of-band and before the client prompts the user whether to trust the key or not. – gowenfawr Aug 10 at 18:35
  • 1
    @NavjotWaraich: The server essentially demonstrates ownership of the public key by proving that it owns the matching private key. This is done in a similar way on how a TLS server demonstrates ownership of the certificate by proving ownership of the matching private key. – Steffen Ullrich Aug 10 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.