1

Is it a major problem if someone can read the public and private keys of /home/<user>/.ssh/

0
4

Public Keys are designed for sharing, read access to public key is fine

Private Keys are secret, they should only be accessible to the owner of said private key.

If someone has accessed your private key it they have the ability to access any device or encrypted file that was protected with your public key. It also means that they can sign things on your behalf ... it is VERY bad if someone has gained access to your private key.

In many cases SSH Clients will not function if it is detected that the permissions of the Private key file are such that users other than you have read access.

2

Reading the public key is not a problem since as the naming suggests: it is for public use anyway. The private key instead needs to be protected. Access to the (unencrypted) private key on key-based authentication is similar to access to the users password on password-based authentication, i.e. the attacker can use it to claim the identity of the users when logging into a specific system.

Your Answer

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

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