Why does sshd
require an absolute path when restarting, e.g /usr/sbin/sshd
rather than sshd
Are there any security implications?
P.S the error message:
# sshd
sshd re-exec requires execution with an absolute path
executablepathSecuritysshd
Why does sshd
require an absolute path when restarting, e.g /usr/sbin/sshd
rather than sshd
Are there any security implications?
P.S the error message:
# sshd
sshd re-exec requires execution with an absolute path
Best Answer
This is specific to OpenSSH from version 3.9 onwards.
For every new connection, sshd will re-execute itself, to ensure that all execute-time randomisations are re-generated for each new connection. In order for sshd to re-execute itself, it needs to know the full path to itself.
Here's a quote from the release notes for 3.9:
In any case, it is usually better to restart a service using either its init script (e.g.
/etc/init.d/sshd restart
) or usingservice sshd restart
. If nothing else, it will help you verify that the service will start properly after the next reboot...(original answer, now irrelevant: My first guess would be that
/usr/sbin
isn't in your $PATH.)