0

I can't seem to find instructions to set up SSH access for my WSL openSUSE.

  • There are plenty of instructions for openSUSE, but those don't work (no systemctl, and no sshd).

  • There are plenty of instructions for WSL, but those don't work (because I'm not running Ubuntu).

I need instructions for WSL openSUSE.

As leeloo would say, "plaese halp"...

1 Answer 1

0

Try dropbear, it is a tiny SSH server.

The installer package won't work under WSL, so build it from source. Download and untar the source somewhere and then build and install like so:

./configure
make
make install

Next you need to create server keys for dropbear:

mkdir /etc/dropbear
cd /etc/dropbear
sudo dropbearkey -t rsa -f dropbear_rsa_host_key
sudo dropbearkey -t dss -f dropbear_dss_host_key

Then start it up:

sudo /usr/sbin/dropbear -F

You should now be able to SSH to your WSL! (I tested from an openSUSE VM running on the same machine. There may be port forwarding and stuff to contend with for external access.)

It should also be possible to run dropbear in the background or add it as a permanent thing to your startup - perhaps someone can provide more details on that if they know how.

8
  • 1
    Sorry, this answer should be a comment, but I don't have enough rep here. :(
    – easrng
    Mar 17, 2020 at 3:22
  • Sounds legitimate enough to me (although a few words of explanation on how to install it in the WSL environment would be nice, since answers should benefit as wide an audience as possible) ...
    – AdminBee
    Mar 17, 2020 at 9:01
  • And does it work on WSL? The OP knows how to set up ssh on openSuSe, the problem is that they need to do it on WSL.
    – terdon
    Mar 17, 2020 at 9:50
  • I haven't tried it yet, however dropbear is very portable so it should work. I'm not on my Win10 computer right now, but when I am, I might be able to expand on the answer. I know it dosn't need systemctl, sshd, etc. though, because I've run it on other *nixes (Jailbroken iOS) that don't have those.
    – easrng
    Mar 17, 2020 at 11:45
  • Thanks for the suggestion. Since the package is for "real" openSUSE, it won't install because it tries to set itself up with systemctl. I tried running it manually but it doesn't seem to be working. Anyone got it to work and can add more detail?
    – aybiss
    Mar 17, 2020 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .