If you try to connect using a key system on ssh instead of a classic password login, you might encounter this error message.
xxxxxxxxxx
$ ssh -i ~/.ssh/id_rsa.pub root@host.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0664 for 'id_rsa.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: id_rsa.pub
root@host.com's password:
this message tells you that because other users can read the content of the key , shh refuse to use it to try authentification on you host ssh.
to fix that problem you should change the permissions on you file so that only you can read it
the 3 numbers in the chmod command are like this
the First is for you
the second is for your group .
and the last is for other users.
If you want to limit the access of others to you ssh key
you could do a
xxxxxxxxxx
chmod 600 ~/.ss/id_rsa
after this command , you can relaunch you ssh command , and you should connect without providing a password.