I am trying to add a public key to a server but I don't want to restart the sshd service for it to take effect. The reason is that restarting the ssh service seems to be disruptive for other users who could use the ssh service at that time. Most documentation suggest to add a public key to $HOME/.ssh/authorized_keys
and then to restart the sshd
service (systemctl restart sshd
). The OS of interest is Linux.
My questions are:
- Is the restart of
sshd
needed? - If
sshd
is restarted, is there a service outage at that time? - Is there a way to set up passwordless auth using ssh without needing to restart the
sshd
service after adding new public keys to$HOME/.ssh/authorized_keys
?