9

Now that Windows 10 has the Windows Subsystem for Linux is it possible to connect to it remotely via SSH? With the Bash shell up and running I tried connecting Putty (running on the same Machine) to localhost but the connection was refused. Has anyone gotten this to work?

Chris
  • 191

2 Answers2

-1

From what I have read, the Linux subsystem is localized (outside of directory/file searching) and doesn't really understand that it exists within a Windows environment. It doesn't "speak" to Windows binaries and API's. So, you can't connect externally to the SSH server running inside of Ubuntu on Windows. Which is a fail in my opinion...but anyway.

However, there is a way to get SSH running on Windows and I have it functioning perfectly. I can do WinSCP and SSH from Putty (including reverse tunneling socks proxy) from the internet through my public and port forwarded to my local machine. Or of course on my LAN as well. Make sure you permit port 22 on Windows FW.

Here are the instructions I followed. If you have any trouble I will try to detail out any steps I took.

https://winscp.net/eng/docs/guide_windows_openssh_server

-2

ssh to a Windows computer with WSL will log you into your Windows home directory (e.g. C:/Users/rhm aka /mnt/c/Users/rhm) running cmd.exe. Executing '/windows/system32/bash.exe ~ --login' will log you into your Linux home directory (e.g. /home/rhm) runing Bash on Ubuntu on Windows and execute your .profile.