I have been trying to get ssh working without a password on a Linux server. I have been looking at a lot of tutorials, but I have a lack of fundamental understanding of some key concepts.
I have an old rsa public key that I generated on my client server, which I am trying to use. I log in to the Linux server, and add my public rsa key to /home/user/.ssh/authorized_keys. I am still prompted for a password when attempting to log in.
My question is whether or not that is the correct authorized_keys file to add my key to. It seems odd that I would put it in my own user directory, but most explanations I have seen on setting up ssh tell me to put my public key in
As a follow up question, is the public key that I generated years ago on my client my identifier for all shh connections or do I need to generate a new one?
UPDATE The errors that are being logged read
trying public key file /home/bsayegh/.ssh/authorized_keys Authentication refused: bad ownership or modes for file /home/bsayegh/.ssh/authorized_keys
The permissions on the file/directory are:
-rwxrwxrwx. 1 bsayegh root 401 May 24 14:30 authorized_keys drwx------. 2 bsayegh root 4096 May 24 14:30 . drwx------. 3 bsayegh bsayegh 4096 May 25 11:38 ..