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
OR
Debian / Ubuntu Linux Restart SSH
OR
FreeBSD Restart SSH
UNIX Restart SSH
The location of /var/run/sshd.pid may be different on OS. So just search a bit through /var/run/ directory.
Hope it helps!
Note that you must login as root user
CentOS / RHEL / Fedora / Redhat Linux Restart SSH
Code:
# /etc/init.d/sshd restart
Code:
# service sshd restart
Code:
# /etc/init.d/ssh restart
Code:
# service ssh restart
Code:
# /etc/rc.d/sshd restart
Code:
# kill -HUP `cat /var/run/sshd.pid`
Hope it helps!