Giter VIP home page Giter VIP logo

Comments (3)

D4rCM4rC avatar D4rCM4rC commented on May 2, 2024

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 /data/ssh directory. Could you try to reproduce the problem and then check permissions and owners of this directory and the pidfile?

from ssh.

Bushmills avatar Bushmills commented on May 2, 2024

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.
While the device is now in a state again that sshd is launched again after boot, I can only report from memory: sshd not starting happened not only with one single upgrade, but with at least two upgrades. When it wouldn't start, it wouldn't do so regardless how often the device was booted. This made me initially believe that the upgrade was broken, und I consequently uninstalled ssh for Magisk. I think I then tried to reinstall a previous version of ssh for Magisk, which failed to launch as well.
At what time I reinstalled again later, I can't say for sure, nor whether in the meantime a new version of custom ROM (lineage OS) was installed, but quite likely it was. Anyway were conditions then such that sshd started again. After a later upgrade, it again failed to launch, which was when I set out to examine possible reasons for failure - which I then believed to have found in the stale sshd.pid, because after noticing it's presence while sshd wasn't running, and subsequent deletion, sshd started again.
Next time this happens, I'll take a better look at permissions of involved files and directories.
To make sure that a stale pid file isn't part of the problem, it could be created in volatile memory.

from ssh.

Bushmills avatar Bushmills commented on May 2, 2024

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.
Working/autolaunching sshd on Android is best thing since sliced bread!

from ssh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.