Personal Website, Tech Blog

Category: Linux

How to autostart ssh server on WSL (Windows Subsystem for Linux)

Problem: whenever you reboot Windows machine, the sshd server on WSL stops. If this happens, you need to manually start the service as a root.

Below procedure allows to run it semi-automatically. Every time you open a terminal window, the script will check if the sshd process is running. If not, it will start it using sudo without asking for password.

Install SSH server

sudo apt install openssh-server

Add the following line to the user’s .bashrc file

vim /home/jakub/.bashrc
ps -C sshd >/dev/null && echo "sshd is running" || sudo service ssh start

Disable sudo password (add this entry to the /etc/sudoers file)


VERR_PDM_NO_USB_PORTS error on Virtualbox (MacOS)

This is a quick one about a problem that I spotted with VirtualBox on my Macbook. I hope someone will find it useful.

I was trying to attach an encrypted USB drive to a Debian 10 virtual machine. Every time I selected the “JMicron USB” disk device from the USB device list, the following error appeared.

I tried couple of things based on what I was able to find about the problem on the Internet:

  • Upgraded VirtualBox to 6.0
  • Configured the USB filter
  • Installed VirtualBox Extension Pack
  • Enabled USB 2.0 controller

Eventually, what worked for me was:

  • USB 3.0 controller (xHCI)
  • VirtualBox 6.0
  • VirtualBox Extension Pack

After changing the settings, I was able to detect my USB drive and mount it successfully.

© 2022 Jakub Bielaszka

Theme by Anders NorenUp ↑

Social media & sharing icons powered by UltimatelySocial