Restart sshd daemon on Linux

Written by
Date: 2011-05-15 10:36:30 00:00

If you ever need to restart the secure shell (ssh) service on Linux, you need to restart the sshd daemon. Here is how to do it on different Linux distributions.

Debian / Ubuntu

/etc/init.d/ssh restart

CentOS / Fedora / Redhat / RHEL

/etc/init.d/sshd restart

Arch Linux

/etc/rc.d/sshd restart

Slackware

/etc/rc.d/rc.sshd restart                                                                                                           

If you know some other distribution that makes it any different, let us know please.

Note: Consider that if you do it remotely, you will not be signed out, unless of course there is something wrong with the configuration and the sshd daemon would not start again, so be careful.