3

There are two servers: A and B

"A" runs ssh-keygen and we copy the private key to "B". Both have the same id_rsa.

Both servers use the common ssh key to connect to server "C".

The question: can ex.: server "A" decrypt server "B"'s ssh communication to server "C"?

Or ssh has perfect forward privacy, which makes the "compromise" of the ssh private key not a problem?

1 Answer 1

1

Looks like PFS is a feature in SSH, so long as it's configured properly. So I doubt server A can decrypt server B's communication to server C. However, it's probably best to use different keys for different clients, for the most security. And if your key is compromised, change it immediately, because PFS doesn't help with client authentication.
EDIT: It's also worth clarifying that ssh-keygen generates keys that are only used to authenticate the client (not to actually encrypt the session), so really sharing keys just allows the clients to impersonate each other. Also, PFS is irrelevant in whether or not the communications can be deciphered (because different clients have different private keys for session encryption, and they don't know the server's private key), it just prevents one compromised session from compromising them all.
Sources: https://utcc.utoronto.ca/~cks/space/blog/tech/SshForwardSecrecy
https://www.ietf.org/rfc/rfc4251.txt section 9.3.7 states that SSH uses D-H key exchange, which supports PFS.
Read this for more on how the process works: Understanding the SSH Encryption and Connection Process

1
  • Actually your source states it should be noted that the Diffie-Hellman key exchanges may provide perfect forward secrecy (PFS)... not that it implies PFS. The key here is whether or not the key are ephemeral (DHE) or not... Commented Apr 7, 2022 at 13:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.