Restarting SSH Service From Linux Shell Command Line

Why you need to Restart SSH Service

As root System Administrators its one of the common tasks you need to be done on live servers is restarting services.If you change ssh configuration file (for example you change the SSH port number) this modification require a restart to take effect.

How To  Restart SSH Service under Linux / UNIX

For CentOS / RHEL / Fedora / Redhat Linux Restart SSH

service sshd restart
/etc/init.d/sshd restart

Restart SSH On RHEL/CentOS/Fedora Linux with systemd

sudo systemctl restart sshd

Restart SSH On Debian / Ubuntu Linux

/etc/init.d/ssh restart
service ssh restart
sudo service ssh restart

Restart SSH On Debian/Ubuntu/Mint Linux with systemd

sudo systemctl restart ssh

Restart SSH On For FreeBSD

/etc/rc.d/sshd restart
sudo service sshd restart

Restart SSH For OpenBSD

/etc/rc.d/sshd restart
doas /etc/rc.d/sshd restart


8,274 total views, 5 views today

Leave a Reply

Your email address will not be published. Required fields are marked *