3

This morning when connecting to my Ubuntu VPS, my local computer is suddenly complaining about my private key:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/noah/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/noah/.ssh/id_rsa

I guess it is possible that I accidentally set the permissions recursively some how, but I think it unlikely... I'm wondering if this might be a result of malware of some sort? I've changed the permissions back to 600, and the warning goes away.

1 Answers1

5

Try looking through your ~/.bash_history (or your shell of choice's history file) to see if you accidentally did chmod-ed your private key. That seems the most likely explanation.

If you share this system with other users and your ~/.ssh/ directory is group or world readable you should generate a new private key (see ssh-keygen).

Yes, it could of been caused by malware or someone could of hacked your system... but as my high school auto shop teacher always said, "Fix the easy stuff first,". Do some investigation and see if just wasn't an accident (I've accidentally chmod-ed many things myself) before you start looking into a security compromise.