Sample Header Ad - 728x90

Add key to authorized_users without needing to restart sshd

15 votes
3 answers
62554 views
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: 1. Is the restart of sshd needed? 2. If sshd is restarted, is there a service outage at that time? 3. 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?
Asked by user1952500 (303 rep)
Jan 26, 2018, 04:38 AM
Last activity: Feb 2, 2024, 11:58 AM