-
Notifications
You must be signed in to change notification settings - Fork 856
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
Cannot autostart sshd service #1150
Comments
Hi @ChrisM-Rogers -- WSL does not "boot" in the traditional sense; upstart scripts are not run automatically. There are a number of existing tickets discussing different aspects of getting sshd working, including #300 and #612 . If you search this bug tracker for "sshd", you'll find additional related posts. There's a forum post here about how to get ssh to start using the Windows Task Scheduler. |
Ideally the (futureproof) solution to this would be replacing MS's hardcoded We're not there yet on kernel features (systemd uses some parts of cgroups), and |
It can't be "hosted by systemd" because WSL is intended to be distribution agnostic. There is nothing to fork off of systemd, because there is no reason to believe systemd exists on the filesystem. |
There's a glimmer of light in the interoperability blog post. "In the future if we begin running other Ubuntu daemons we will likely switch our daemon from replacing /sbin/init to simply being another daemon on the system." |
This would be nice to have. Also, please don't do systemd, that's a horrible mess of code. |
@gczuczy In theory if they support systemd they will support any init system. Thing is that all big distros are using systemd as default (ubuntu, debian, arch, centos, fedora, RHEL). Since most Linux users are happy to use the default init system for the foreseeable future, it would be nice to see it supported. I bet if you wanted to compile a custom gentoo userspace, you could probably get a fully working version of whatever it is they use (OpenRC, or rc.d I think it is called?) by hacking it to let it run as PID!=1) |
Ironically you are correct. If they support Ubuntu adopted Also something else to consider. While Ubuntu, Debian, etc etc have adopted Which is not to diminish correctness of your observation that "it would be nice to see it supported". That said, it would have been equally "nice" if Canonical had not adopted |
@therealkenc -- you have a point that You could claim that the old |
@therealkenc those "dupes" will keep on coming until you fix the issue. |
I am sure they will. It's a big Internet, there are people who aren't able or willing to search for dupes on their own, and just on a statistical basis (because tens of thousands of WSL users) it is bound to happen. That a small minority of users don't search for dupes before posting is most unfortunate, and drags down the signal to noise ratio and overall usefulness of this github repo, but what can ya do.
Me??? Heck I fixed the problem to my own personal satisfaction last year. I don't use the fix mind you (it was a "what would it take" experiment), because ....
.... it kinda is. Actually, between you and me, I type I don't work for or speak for MSFT, natch. Maybe the devs are working on |
Use sudo /usr/sbin/sshd |
I'd like for the sshd service to autostart upon opening bash however, it seems to not work.
To attempt this I ran
sudo update-rc.d ssh default
closed and reopened bash,sudo service ssh status
revealed that the service is not running. I attempted to ensure the init script was executable by runningsudo chmod 755 /etc/init.d/ssh
. But still no luck. I removed ssh from the start script and re-added it again usingsudo update-rc.d ssh start 20 2 3 4 5 . stop 20 0 1 6 .
and proceeded to restart my machine completely (for good measure), launched bash and the service still isn't running.I have no trouble manually starting ssh and can successfully connect to it from another device.
Last of all my Windows build number is 14393.187.
The text was updated successfully, but these errors were encountered: