diff --git a/secure-ssh.md b/secure-ssh.md index 80087e8..a2d4f9a 100644 --- a/secure-ssh.md +++ b/secure-ssh.md @@ -12,15 +12,7 @@ Create a new key pair on your client: ssh-keygen -b 4096 ``` -Remember the path and password you choosed. Append the created public key from `//.pub` on your client in the `/home//.ssh/authorized_keys`. - -If you changed the path you can add the following to your `~/.ssh/config` file on your client: - -``` -Host - User # optional - IdentityFile // -``` +Remember the path and password you choosed. Append the created public key from `//.pub` on your client in the `/home//.ssh/authorized_keys` on your server. Now edit `/etc/ssh/sshd_config` on your server and set the following values: @@ -30,3 +22,15 @@ AuthorizedKeysFile .ssh/authorized_keys PasswordAuthentication no ``` + +If you changed the path you can add the following to your `~/.ssh/config` file on your client: + +``` +Host + User # optional + IdentityFile // +``` + +## Apply Changes + +To apply changes you made in the ssh config simply run `systemctl restart ssh.service` or `service ssh restart`. \ No newline at end of file