How to setup .ssh folder permissions

May 24, 2018 by Zemian Deng Comment

Tags: ssh linux

How to setup .ssh folder permissions

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