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
Or
/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
Or
service ssh restart
Or
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
Or
sudo service sshd restart

Restart SSH For OpenBSD

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

 

3,895 total views, 8 views today

Rate this post

Leave a Reply

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

*