OpenBSD Restart / Reload OpenSSH Without Rebooting

Posted on in Categories , , last updated May 27, 2009

There is no rc.d script provided under OpenBSD for sshd service. How do I restart OpenSSH sshd server without rebooting OpenBSD 4.x server?

You need to send HUP single to OpenSSH SSHD server using kill command. The default pid file is located at /var/run/sshd.pid:
# cat /var/run/sshd.pid
Sample output:

5367

Send HUP single to sshd PID # 5367:
# kill -HUP 5367
This can be done with a single command as follows:
# kill -HUP `cat /var/run/sshd.pid`

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Leave a Comment