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
1
Views
24
Replies
0
Views
179
Replies
1
Views
39
Replies
2
Views
81

Latest postsNew threads

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