I have made some changes to /etc/ssh/sshd
file and wanted these effects should take place.
I know I can run below command for the effects to take place.
/etc/init.d/sshd reload
But on my box I could not find /etc/init.d/sshd
itself.
So is there any other command can I run which is equivalent to
/etc/init.d/sshd reload
Edit: I am on linux kernel 2.6.28 running on embedded development board.
Best Answer
Try:
systemd
If that doesn't work and your using a distro such as Fedora/CentOS/RHEL and it's using
systemd
then try this:You can get all the commands that
sshd.service
will accept by doing this. Hit the Tab key after typing the following:If it's a Debian/Ubuntu system they use
upstart
to mange services, at least with the newer versions.See my answer to this Q&A titled: How to “close” open ports?. I discuss your options for using upstart & systemd further in that answer.
Neither?
You could use
kill
to send the SIGHUP signal to the running process if none of the above are appropriate for your particular distro.Will send signal 1 (SIGHUP) to the sshd process. If you don't have the
pkill
orpgrep
family of commands you can useps
.$ ps -eaf | grep sshd 1234
Then take that process ID and send it a signal using the
kill
command.Signals
If you ever forget which ones are which you can use the
kill
command to find out via the-l
switch.Example
References