Sunday, October 2, 2016

The Bonus OpenSSH

So, continuing to determine how far I can get with the Windows Subsystem for Linux (WSL) -  Previously, it was pretty straightforward to clone in a Git repository that resided on another machine running XUbuntu 14.04.  Unfortunately, cloning out a repository living in WSL did not work as well.  The default protocol I used went over ssh and didn’t connect in.  Given that I hadn’t installed sshd yet, this is not entirely surprising.  But I thought perhaps it was installed by default.
 
Poking around trying to find what network services are available showed what is not.

Doing an ifconfig from the bash shell returned the message:
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
ifconfig: command not found

Switching to root and repeating ifconfig yielded a different message, but still not the data being searched for:
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.

Neither was ping available from the bash command line:
ping: icmp open socket: Permission denied

Apparently, network services in WSL are still limited.

So, while testing an ssh connection in from another machine to see if anything was already listening led to an unexpected discovery.  The was an ssh server receiving connections and these connections were going to the standard Windows command line.  It was using the Windows login usernames and credentials but not the usernames from the WSL.  Doing a little online searching revealed the project behind this.  Here is the initial announcement from Microsoft:


And then a later announcement of public availability of the code:


Note that while it is on by default, it would seem that it is only installed if you enable Developer Mode (Settings->Update & Security->For developers) and also if your OS is up to Version 1607 (for Windows 10 Home edition).  I have a Windows 10 machine still on version 1511 and enabling Developer Mode did not cause OpenSSH to be running. (Neither did it provide for the option of turning on Windows Subsystem for Linux.)

So I guess we’ll have to see what sort of conflict arises by trying to install sshd within the WSL.

No comments:

Post a Comment