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
Replies
0
Views
30
Replies
0
Views
72
Replies
1
Views
226
Recommended Threads
Replies
19
Views
5,420
Replies
3
Views
2,704
Replies
8
Views
2,351
fwh
Replies
11
Views
3,158

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