How to SSH into the BASH Ubuntu instance built into Windows 10

If you have Windows 10 Anniversary Edition, you’re probably aware that you can run a complete Linux instance inside of Windows 10.

But wouldn’t it be cool if you could open a SSH session to the BASH shell from PuTTy running on your Windows 10 host?

1. Install PuTTy

The first thing we need to do is to get PuTTy on our Windows 10 host.  If you already have it you’re good – if not grab it from the official PuTTy site:


2. Enable BASH on Windows 10

Mash the Windows Key, type “developer” and then click Developer Mode under Use developer features in the right pane of the Settings window.


You’ll be asked to reboot.  When you come back, hit the Windows Key again and type “Turn Windows features on or off” then scroll down to “Windows Subsystem for Linux (Beta)”, click OK wait for the installation to finish (takes about 5 minutes) and then you’ll reboot again.


Okay, now we’re ready to go

Press the Windows Key + r and type “bash” to load the BASH shell.  We need to set it up.

The command prompt will ask you to download Ubuntu from the Windows Store.  Hit “y” to continue, let it download (took me about 15 minutes to download) and then you’ll create your UNIX username (which is distinct from your Windows username) and your password for that Linux account.


Now we need to install openssh.

I typed clear to clear the screen and then:

sudo apt-get install openssh-server



Now let’s configure the sshd_config file so we can make this baby work.


sudo vi /etc/ssh/sshd_config

Type the forward slash key and then enter:

PermitRootLogin without-password



Now press “i” to enter the edit mode and change it to:

PermitRootLogin no

Press escape to leave edit mode

then press the forward slash again and enter:


We need to change this to yes

Do the same thing to change UsePriviledgeSeperation to no


Now press Escape and hit capital g:


to jump to the bottom of the file and then press


to enter insert mode again.  We need to add a line:

AllowUsers vhudson


Swap out vhudson with the username you created when you installed Bash.

Press Escape to enter command mode..

Hit ZZ to save the file and close and then bounce the SSH service.

sudo service ssh --full-restart

connect to using PuTTY and you should be in!


Now just login with your UNIX creds



Connect with Vonnie on Twitter

Posted in Windows, Windows 10 Tagged with:
  • Alexander Weps

    How to listen on public interface?

    • mwk

      Open up your Windows Firewall by adding a rule.
      However, as a standalone sshd it won’t work, and using the OpenSSH Beta in Windows 10 to ssh in, then try to open ‘bash’, generates an error. So either way it’s useless. Typical Microsoft talentless garbage – what happens when anyone with critical thinking skills won’t work for these SJW-filled companies.

  • gskema
  • mwk

    A) Why would you turn off UsePriviledgeSeparation?
    B) This only works (ssh into the sshd environment of Bash/Ubuntu under the WSL, if you have a Bash prompt open. Close it and your sshd is no longer running. More Microcrap.