One of the more prominent new features included with the Windows Subsystem for Linux (WSL) Windows 10 version 1803 is the ability for jobs to continue running after all the WSL terminals have been closed. This feature is certainly an upgrade -- in previous versions, all processes running under WSL quit after all the WSL terminals are closed. Given the fact that processes such as SSH can now keep running, this feature is quite a powerful one.
Then, after verifying that the script was working correctly (Figure 1), I closed the WSL terminal.
[Click on image for larger view.]	Figure 1. The WSLTest script.
After examining the output (Figure 2), I was satisfied that the process did continue to run after I had closed the WSL terminal.
[Click on image for larger view.]	Figure 2. The WSLTest script output.
The results of running these commands can be seen in Figure 3.
[Click on image for larger view.]	Figure 3. Starting the SSH server.
I then verified the ability to connect to the SSH server running on WSL by connecting to it from the WSL terminal; to avoid any conflicts with the SSH server running on the actual Windows system, I used port 2200 for the WSL SSH session (Figure 4). Next, I closed my WSL terminal and connected to the WSL SSH server using PuTTy from the Windows session (Figure 5) without any issues.
[Click on image for larger view.]	Figure 4. The WSL SSH connection.
[Click on image for larger view.]	Figure 5. The PuTTY SSH connection.
After I proved that SSH would continue to work after all the WSL terminals were closed, I locked my Windows 10 session, and went to another system to see if I could still connect to it -- I could (Figure 6).
[Click on image for larger view.]	Figure 6. SSH from a locked terminal.
For the final test, I logged out of the Windows system to see if the process would continue to run, and it didn't. When I logged back in, I needed to restart WSL and the SSH process before I could use SSH again.
In closing, having processes that continue to run after all the WSL terminals are closed is a powerful feature that opens WSL to a wider range of workflows, and increases its value as a programing tool.