This post was originally published on go2linux.org, a Linux blog I ran from 2007 to 2011. The domain is no longer mine, but I am the original author. I am republishing it here on garron.me with corrections and improvements.
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.