Greg's Tech blog

Fun with WSL (Ubuntu on Windows)

Tuesday 15 of August, 2017

I'm running WIndows 10 1703 and have been toying with the Windows Subsystem for Linux (WSL). THis version is based on Ubuntu.  There is some fun it making it useful.  

SSH into WSL

I want to use putty from anywhere to access the shell. SSH requires a few things to make it useful.  Start the bash shell and edit /etc/ssh/sshd_config (sudo nano /etc/ssh/sshd_config)

  • Change the listener.
    • port 2222
  • Turn on Password Authentication (I'll discuss key auth in a bit)
  • Turn off Privilege separation. Rumor has it it isn't implemented
  • Allow TCP port 2222 in the Windows Firewall
  • Generate host key
    • sudo ssh-keygen -A
  • Restart ssh service
    • sudo service ssh --full-restart

You should be able to ssh into the host.