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 reloadBut 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.
What are the commands to apply changes made to /etc/ssh/sshd_config?
linux;ssh;sshd
Try:$ sudo /etc/init.d/sshd restartsystemdIf that doesn't work and your using a distro such as Fedora/CentOS/RHEL and it's using systemd then try this:$ systemctl sshd.service reload You can get all the commands that sshd.service will accept by doing this. Hit the Tab key after typing the following:$ systemctl sshd.service cancel                 emergency              is-enabled             list-unit-files        reload-or-restart      startcondreload             enable                 is-failed              list-units             reload-or-try-restart  statuscondrestart            exit                   isolate                load                   rescue                 stopcondstop               force-reload           kexec                  mask                   reset-failed           suspenddaemon-reexec          halt                   kill                   poweroff               restart                try-restartdaemon-reload          help                   link                   preset                 set-environment        unmaskdefault                hibernate              list-dependencies      reboot                 show                   unset-environmentdelete                 hybrid-sleep           list-jobs              reenable               show-environment       disable                is-active              list-sockets           reload                 snapshot               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.$ pkill -1 sshdWill send signal 1 (SIGHUP) to the sshd process. If you don't have the pkill or pgrep family of commands you can use ps.$ ps -eaf | grep sshd1234Then take that process ID and send it a signal using the kill command.$ kill -1 1234SignalsIf you ever forget which ones are which you can use the kill command to find out via the -l switch.Example$ kill -l 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP 6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR111) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+338) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+843) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+1348) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-1253) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-758) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-263) SIGRTMAX-1  64) SIGRTMAX    ReferencesF.9. Administering services with systemd