Restart SSH service

Ubuntu 16.10 and later, RedHat/CentOS 7 and later, fedora and other platform with systemd

sudo systemctl restart sshd.service

Older platforms with System V init scripts

sudo /etc/init.d/sshd restart

Platforms with service command. Normally a wrapper to System V init scripts or systemd commands.

sudo service ssh restart

Sign up for Complete Secure Shell Course and many other great courses on Udemy to learn more.

Written by Mohd Shakir Zakaria. Last updated on 2019-02-12