Comments (3)
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.
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.
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)
- Without changing permission of authorized_keys, ssh won't login HOT 3
- Can't login - android 10 HOT 2
- if sshd is set to listen on VPN ip address, it will not launch.
- Some dirs are not deleted when uninstall
- Android 5.1 failed to start ssh
- help wanted - how can I access files on multi-user setups in Android 10?
- Cannot login with users other than root and shell
- Releases/tags HOT 3
- For those who can't get public key authentication working HOT 5
- `/tmp` no such file or directory (on v0.14)
- unzip HOT 3
- Ssh
- Required Directory Permissions & Ownership.
- Unable to negotiate cyber
- Does it support usb ssh, for example, connect with 127.0.0.1 for ip HOT 1
- /usr/local/bin/ssh: No such file or directory
- installation failed,why did the install template not update? HOT 1
- where is the download? HOT 1
- More PATHs? HOT 1
- No ssh command. Paths missing? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssh.