I can ssh the linux inside my windows 10, I usually use securecrt and I configured port 9999 , however once close the bash terminal, the SSH terminated and I get The remote system refused the connection. then I reopen the bash terminal I find that ssh daemon is not running so I have to do sudo service ssh start , to be able to ssh again. I have to do that every time
Starting in Windows Insiders Build 17046, WSL supports background tasks (including daemons). In the past, if you opened WSL and started sshd, httpd, screen, or tmux you needed to have a console window open to keep those tools running. But, starting with 17046, these processes will continue running in the background even after the last console window has been closed.
The April update is build 17133.1 and includes this change.
Alternatively, you can continue to use an earlier version and just leave the window open, or use the third-party
wabash tool to pretend you did.