-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stale sshd.pid prevents start #11
Comments
Thanks for the hint about the wrong opensshd.init path in the README. I'll update that in the next version. Unfortunately I cannot reproduce your problem. sshd never fails to launch on my device. I don't think sshd even cares about an existing pidfile. It will just overwrite it, if it exists (https://github.com/openssh/openssh-portable/blob/master/sshd.c#L1925). The only thing I could imagine (especially as you mentioned updates), are messed up permissions in the |
Ok, I've removed removal of /data/ssh/sshd.pid from shutdown event, now I'm waiting for upgrades. Concerning permissions: though I didn't look at those, I also didn't modify them in order to get sshd running again. Looking at opensshd.init, it indeed doesn't care about a stale sshd.pid. sshd docs say it will contain the pid of the last started server in case several are launched - which implies overwriting and not caring about an existing pid file. |
That didn't happen again since. It must have been a glitch of some kind, or some other condition preventing sshd to start which was somehow removed by accident while I was trying to figure out the problem cause, then I made the change of my last action responsible. |
Possibly the cause of other posts related to "sshd not running": Especially after installing updates of ssh for Magisk did sshd fail to start on next device boot. The cause has been found to be a stale /data/ssh/sshd.pid file. After deleting that file manually, sshd will run on next boot, and can alternatively be manually launched by executing opensshd.init
Path of opensshd.init doesn't match the path specified in the instructions. This may be due to Magisk hidden on my system. I find it it here: /sbin/.magisk/img/ssh/opensshd.init
My workaround for the pid problem is now to let shutdown trigger execution of rm -f /data/ssh/sshd.pid
The text was updated successfully, but these errors were encountered: