ssh decipher a tunnel

Two question here, but it's only one on the protocol point of view.
If two persons use the same key to connect to a SSH server is there a risk they can decipher the other tunnel. In other terms is that less safe than if they have two separate keys.
Same question if two persons use the same user account (with password connection way this time no key).
Thanks in advance for your replies :slight_smile:

There's no risk of deciphering the other tunnel, since the public key authentication is only used for (as the name implies) authentication. The actual encryption key is symmetric, and derived by a Diffie-Hellman key exchange between the client and the server.

The bigger problem would be a compromised account, since each user using the same key/password increases the risk of one passing it around.

1 Like

okay thanks a lot for the reply.
no problem with the account as shell login won't be enable, i will only use the connection for port tunneling. It's for a java program which will establish connection through the proxy to the postgresql server and to a RMI server(java equivalent for web services).
I will establish tunnels on the client side before launching the program using something like this :
ssh -L 5432:127.0.0.1:5432 -L 1099:127.0.0.1:1099 powerLessUser@postgreAndRmiServer
(5432 is the postgresql default port and 1099 the RMI one)
Thanks again for your reply :slight_smile:
best regards, moi.

by the way is there a way to mark this post as resolved ??