How to restart SSH Service under Linux / UNIX

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
If you want to restart ssh, you can do as following commands
Note that you must login as root user

CentOS / RHEL / Fedora / Redhat Linux Restart SSH

Code:
# /etc/init.d/sshd restart
OR

Code:
# service sshd restart
Debian / Ubuntu Linux Restart SSH

Code:
# /etc/init.d/ssh restart
OR

Code:
# service ssh restart
FreeBSD Restart SSH

Code:
# /etc/rc.d/sshd restart
UNIX Restart SSH

Code:
# kill -HUP `cat /var/run/sshd.pid`
The location of /var/run/sshd.pid may be different on OS. So just search a bit through /var/run/ directory.

Hope it helps!
 

Laurence Flynn

Well-known member
Registered
Joined
Dec 31, 2016
Messages
92
Points
8
Hah, how do you start SSH when SSH is down? ;)
 
Latest Threads
Recommended Threads
Replies
2
Views
2,120
Replies
6
Views
5,330
Replies
2
Views
1,465
Replies
0
Views
2,141

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top