May 24, 2018

How to setup .ssh folder permissions

How to setup .ssh folder permissions

chmod 700 ~/.ssh                 # (drwx------)
chmod 600 ~/.ssh/authorized_keys # (-rw-------)
chmod 600 ~/.ssh/id_rsa          # (-rw-------)
chmod 644 ~/.ssh/id_rsa.pub      # (-rw-r--r--)
chmod 755 ~                      # (drwxr-xr-x)

ref: https://superuser.com/questions/215504/permissions-on-private-key-in-ssh-folder