- Turn off password access in
/etc/ssh/sshd_config
- Turn off GSS API access in
/etc/ssh/sshd_config
- Change AuthorizedKeysPath in
/etc/ssh/sshd_config
to/ssh_keys/%u/authorized_keys
- Place public keys in
/ssh_keys/%u/authorized_keys
- NOTE: The sysadmin needs to do this manually for every user, after the user executes
ssh-copy-id
- NOTE: The sysadmin needs to do this manually for every user, after the user executes
sudo chown root:root -R /ssh_keys
sudo chmod 711 /ssh_keys
sudo chmod 711 /ssh_keys/%u
, for all userssudo chmod 644 /ssh_keys/%u/authorized_keys
, for all userssudo systemctl restart sshd
Created
February 23, 2020 20:37
-
-
Save stojan211287/3bdb7e688e617de6f1e9754230125f65 to your computer and use it in GitHub Desktop.
How to setup a server with secure SSH access and a centralized public key store
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment