Assalamualaikum wbt and greeting everyone! I’ve had the same ssh keys for years. I just rsync them to a new system when I get one. The problem is I always seem to end up with mucked up permissions moving them around and never seem to remember how the permissions were set. Now let put some note as my future reference here.
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys
$ chmod 644 ~/.ssh/config
$ chmod 600 ~/.ssh/id_rsa
$ chmod 644 ~/.ssh/id_rsa.pub
$ chmod 644 ~/.ssh/known_hosts
$ ssh-add
It should be okey and worked!
Update : Another great tips from mcepl is to use chmod 600
on ~/.ssh/config
and ~/.ssh/known_hosts
file plus more athmane said if you selinux is enforcing mode, just execute restorecon -Rv ~/.ssh
from terminal.
Robbi Nespu | Fedora, Linux
The postings on this site are my own and don't necessarily represent my employer’s positions, strategies or opinions.
©Robbi Nespu, 2021 — built with Jekyll + Lagom theme
Home |
Contact |
Archive |
Privacy policy
Discussion and feedback