I am trying to SSH from my local machine to my server. In the past I haven’t had to enter a password because my public key was on the server in authorized_keys. However, today I think some permissions have been changed on some files and it’s asking for a password every time I try to SSH.
What are the correct/default permissions for the .ssh folder and its contents on my local machine/server?
Here are my current permissions
My server
[root@server9987 .ssh]# ls -la
total 24
drwx------ 2 root root 4096 Oct 17 03:29 .
drwxr-x--- 7 root root 4096 Oct 17 03:29 ..
-rw------- 1 root root 397 Oct 16 19:11 authorized_keys
-rw------- 1 root root 1675 Oct 12 02:10 id_rsa
-rw------- 1 root root 398 Oct 12 02:10 id_rsa.pub
-rwxrwxrwx 1 root root 830 Oct 17 03:29 known_hosts
My local machine
➜ .ssh l
total 32
drwx------ 6 Oliver staff 204 17 Oct 00:28 .
drwxr-xr-x 7 Oliver staff 238 16 Oct 17:28 ..
-rw------- 1 Oliver staff 332 16 Oct 17:28 config
-rw------- 1 Oliver staff 1766 13 Jul 11:13 id_rsa
-rw------- 1 Oliver staff 398 13 Jul 11:13 id_rsa.pub
-rw------- 1 Oliver staff 3312 17 Oct 00:28 known_hosts
known_hostsshould not be group writable or world writable. – David Schwartz Oct 17 '12 at 0:34