Score:2

I changed permissions in my /home dir to 750 and files in it now I'm not able to connect the server

nl flag

I changed the /home dir to 750 and files in it.

Now I'm not able to connect the server with SSH public key. It’s showing the error Permission denied (publickey).

Liso avatar
sd flag
Did you by any chance, chmod recursively ?
George Udosen avatar
rs flag
Where is your server hosted?
Score:3
vn flag

It sounds like the permissions have been changed recursively.

The files in the directory ~/.ssh need very strict permissions, especially these 2 files:

-rw-------  1 am  402 2020-04-26 18:00 authorized_keys
-rw-------  1 am 2.6K 2020-05-13 23:56 id_rsa

As you can see, these files need to have permission octal 600.

To fix this, you either need physical or root access to the machine to revert the permissions to 600.

Please note that to get SSH access, the only needed file is authorized_keys (with permissions 600).

Also for reference, the following files should have permission octal 644:

-rw-r--r--  1 am  559 2020-05-13 23:56 id_rsa.pub
-rw-r--r--  1 am 5.0K 2021-02-27 18:02 known_hosts
raviteja avatar
nl flag
Thank you Artur, I wonder 750 will not do the job?
raviteja avatar
nl flag
-rw------- 1 autobot autobot 408 Oct 5 2018 authorized_keys -rw-r--r-- 1 autobot autobot 222 Nov 8 09:21 known_hosts
raviteja avatar
nl flag
these are the same setting for another replication server.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.