0

I'm trying to ssh from my LAN devices (phone, laptop and even the same computer) into bash.exe following Microsoft's guide on changing the default shell for OpenSSH to bash.exe. Bash in this context should start up "wsl -d YOURDEFAULTDISTRO", which it does if I run it in my local computer. However when I ssh into it, I get:

??? ????? ?????? ? ???????? ??? ?????? ??? ?? ???????
Connection to <my_ip> closed.

I can ssh into powershell normally, no problems there. My Windows are setup in the Greek language, maybe that could be why I'm getting back question marks?

Ramhound
  • 44,080
AxillV
  • 1

1 Answers1

0

You will find a better tutorial in the blog
THE EASY WAY how to SSH into Bash and WSL2 on Windows 10 from an external machine.

This blog post uses Windows' OpenSSH and authenticates with Windows and then runs WSL2. WSL2 starts up, uses bash, and Windows handles the TCP traffic.

To summarize the article :

  • Enable the OpenSSH Server in Windows by in an Admin PowerShell :

    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
    

    You may verify that it worked using :

    Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
    
  • To set the default shell :

    New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\WINDOWS\System32\bash.exe" -PropertyType String -Force
    
harrymc
  • 498,455