5
$\begingroup$

I've read in DigitalOcean article about SSH that in order for a server to authenticate a client:

  1. The server sends the client this encrypted message.
  2. If the client actually has the associated private key, it will be able to decrypt the message using that key, revealing the original number.

But wasn't it enough for the client to sign the message, why do we need the encryption? Also, given that DSA keys can be used in SSH I'm starting to doubt that the article is correct.

$\endgroup$

1 Answer 1

11
$\begingroup$

The article is surely wrong.

Nowadays, the sole purpose of client-side private key in SSH is to sign messages (as their algorithms are typically ECDSA EdDSA, etc), the server doesn't encrypt the challenge, it almost certainly verifies it with the public key(s) in the authorized_keys file

$\endgroup$
2
  • 11
    $\begingroup$ The article's author is probably remembering how it used to work in SSHv1 (which, being RSA-only, did use challenge decryption) and assuming that it still works the same way in SSHv2, which it doesn't. $\endgroup$
    – user1686
    Dec 2, 2019 at 11:24
  • $\begingroup$ @grawity, that's a great remark, thanks! $\endgroup$ Dec 2, 2019 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.