1

Would like to seek for advice for an issue regarding Windows 10's new OpenSSH feature.

Firstly, I have installed the "ubuntu" from Windows Store following the support of Windows Subsystem for Linux. It functioned properly, ubuntu could by launched successfully from either cmd or powershell sessions locally (just type "ubuntu").

(Reference: https://docs.microsoft.com/en-us/windows/wsl/install-win10 )

Then I installed "OpenSSH Server (beta)". After some setup, from another device I could SSH into the Windows machine, and it showed command prompt (cmd) as default. I could open a powershell session by just typing "powershell".

However, I could not launch ubuntu from neither cmd nor powershell in the SSH session. In either case, after I enter "ubuntu", it just loads a while and ended with nothing happened.

May I know if there are additional setup required to launch linux shell from cmd/powershell in Win 10 SSH? Would also like to see if there is a way to change the default terminal type (cmd/powershell/ubuntu etc.) upon SSH login , thanks!

(Reference: https://blogs.msdn.microsoft.com/powershell/2017/12/15/using-the-openssh-beta-in-windows-10-fall-creators-update-and-windows-server-1709/ https://www.bleepingcomputer.com/news/microsoft/how-to-install-the-built-in-windows-10-openssh-server/)

========== UPDATE (25 Apr 2018) ==========

After following the guidlines below to set the local launch and activation rights, I managed to get ubuntu launchable from a SSH cmd session.

(Reference: https://adrift.io/2017/10/11/windows-subsystem-for-linux-error-0x80070005-access-denied/)

I could see the bash shell is launched. However, I could not type in anything in the terminal. It looked as if the cursor is freezed.

bash shell freezes

No error is observed in the Windows event viewer.

Kindly see if you have any ideas on this, thanks.

2 Answers 2

0

Would like to update here that the issue miraculously got solved after the ubuntu self-update (checked on 25 May 2018).

Ubuntu_launchable_from_SSH-CMDandPOWERSHELL

Not sure if it is some fix performed there, but ubuntu could be launched from CMD and POWERSHELL in SSH session now. Hope others having similar issues can get it working as well. Cheers.

0

For launching Ubuntu on WSL, you will need to Invoke it from Windows CMD/PS by just typing "wsl" (without the quotes). It will then directly take you to the Ubuntu bash prompt on WSL by default. Invoking with command "ubuntu" is no longer supported.

SSH Into Windows localhost

Inside Windows CMD after SSH into localhost

Getting Into Ubuntu on WSl from Windows CMD

For coming out of the nested sessions, you will just need to type exit in each respective session.

What you cannot do as of date is launch wsl while doing SSH to localhost, using the commands:

PS> ssh bahree@localhost "wsl"
C:\Users\Bahree> ssh bahree@localhost "wsl"

This may have been deliberately prevented by WSL folks, owing to some issues they might have anticipated/tested.

However, the following commands are legit and work as expected:

PS> ssh bahree@localhost "powershell"
PS> ssh bahree@localhost "cmd"
C:\Users\Bahree> ssh bahree@localhost "powershell"

HTH

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .