Assuming that user_A and user_B set up and exchange public ssh keys with each other, is it possible for user_A to su into user_B on the same machine?

1 Answer 1


The ability to use su is usually controlled by pam, and has nothing to do with public key authentication as used with ssh.

Provided the public key of user_A is in user_B's authorized_keys file, all user_A needs to do is:

$ ssh user_B@localhost

It might the wording is not totally clear in your question, but private keys are not shared.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .