In linux, why would you restart ssh using the service command, i.e. by doing "sudo service ssh restart", vs just running the ssh daemon initialization script directly with: "/etc/init.d/ssh restart"? (there are 2 reasons)1
Answer
Because service runs the ssh initialization script in a safe way by 1) removing most environment variables and 2) with current directory as /, thereby mimicking exactly what happens when the script is run during host initialization.
Question
In linux, why would you restart ssh using the service command, i.e. by doing "sudo service ssh restart", vs just running the ssh daemon initialization script directly with: "/etc/init.d/ssh restart"? (there are 2 reasons)1
Answer
?
Question
In linux, why would you restart ssh using the service command, i.e. by doing "sudo service ssh restart", vs just running the ssh daemon initialization script directly with: "/etc/init.d/ssh restart"? (there are 2 reasons)1
Answer
Because service runs the ssh initialization script in a safe way by 1) removing most environment variables and 2) with current directory as /, thereby mimicking exactly what happens when the script is run during host initialization.
If you want to change selection, open document below and click on "Move attachment"
service - Unix, Linux Command ipt in as predictable environment as possible, removing most environment variables and with current working directory set to /. The SCRIPT parameter specifies a System V init script, located in <span>/etc/init.d/SCRIPT. The supported values of COMMAND depend on the invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and sto
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.