Hi! We just had a major panic being unable to access our site server via ssh for a day. We thought we'd have to get on a plane and go physically to where it is hosted but fortunately one of our gurus managed to find some security exploits to get in and restart sshd. The cause turned out to be that someone had installed the latest version of OpenSSH, had killed and restarted sshd by saying "sshd"... one and a half months later, I came to reconfigure it, kill -HUPped it, and it just died because there was no "sshd" in its current directory. I didn't notice and logged out. Consequence: machine unaccessible to fix it (it's hosted in another country from where everybody lives). The fix is for the restart code to allow for this possibility and, if argv[0] doesn't contain any / characters, to try execvp after the initial execv in sshd.c If I can find a button that says "attach", I'll attach the diffs... All the best!
Created attachment 499 [details] Patch to sshd to fix pathless-restart trap
no, i don't think this will change. the current behaviour is documented, and your change will cause sshd to restart the first sshd from the $PATH. this is not really predictable behaviour.
sshd rereads its configuration file when it receives a hangup signal, SIGHUP, by executing itself with the name it was started as, i.e., /usr/sbin/sshd.
Mass change of RESOLVED bugs to CLOSED