Windows 10: Weird SSH issue with WSL2 and WSL1

Discus and support Weird SSH issue with WSL2 and WSL1 in Windows 10 Customization to solve the problem; Hello all, So this is something that has been bugging me for a while now. I have this situation where I connect using SSH: My_Computer --SSH->... Discussion in 'Windows 10 Customization' started by IonutDavid, Jun 15, 2020.

  1. Weird SSH issue with WSL2 and WSL1


    Hello all,


    So this is something that has been bugging me for a while now.


    I have this situation where I connect using SSH: My_Computer --SSH-> ServerA --SSH-> ServerB

    The connection to ServerA is done with public key auth, and the connection from ServerA to ServerB is regular username/password.


    For some strange reason, whenever I use WSL2 with an Ubuntu image the default over the Windows Store, I never get to connect to ServerB. I successfully connect from my computer to ServerA with my key and from there the moment I input "ssh username@serverB" I immediately get the error "ssh_exchange_identification: Connection closed by remote host", like instantly, which is very weird, as I assume the segment ServerA -> ServerB doesn't have much to do with WSL2, especially since the first connection from my computer running WSL2 to ServerA works perfectly fine.


    I can replicate this issue on several computers and always with WSL 1 and 2.

    Using any other solution, like Putty, SolarPutty, SnowflakeSSH, actual Ubuntu VM using Hyper-V/Virtualbox/VMWare works perfectly fine all the way up to ServerB.


    Can anyone shed any light into this?



    Thanks.

    :)
     
    IonutDavid, Jun 15, 2020
    #1
  2. Brink Win User

    WSL2 will be generally available in Windows 10 version 2004

    Source: https://devblogs.microsoft.com/comma...-version-2004/


     
    Brink, Jun 15, 2020
    #2
  3. jimbo45 Win User
    New Windows 10 Insider Preview Fast+Skip Build 18980 (20H1) - Sept. 11 Insider

    Hi folks

    WSL2 breaks running any GUI programs you had working with WSL1 -- seen some suggestions on Google but I'll wait until some more people have played with it -- seems there's a problem with accessing the display properly due to generated IP addresses -- but I'm not fiddling with that any more.

    Running Ubuntu LTS on WSL1 with lightweight LXDE desktop works - some GUI programs run as they do if you install the KDE desktop.

    WSL2 breaks the whole kybosh -- but for running command line scripts and non GUI executables it seems fine (WSL2) . You need to install an X-server on windows and use the XLaunch icon on your desktop before starting the Linux GUI -- also you'll need to export DISPLAY=0:0 before using your command on wsl to launch the GUI e.g startlxde. (Lxde is s super dooper lightweight desktop gui which is good for testing if the thing works --you can install more heavyweight stuff once you've got the X-Server working properly.

    OK WSL isn't meant to be a complete Linux desktop distro or a fully endowed virtual machine - but what's wrong in testing these things to their limits !!!!

    What is nice is you can reset or switch your Linux distro to WSL1 or WSL2 back and forth without having to re-install your distro -- you can also set the default WSL level -- I'd keep the default at 1 until WSL2 is a bit more commonly used -- most things (non GUI) that work on WSL1 will probably work on WSL2 -- file manager is good on WSL2 and you can natively access Linux file systems (with long file names too !!!!!) over a LAN or even attached to the Windows machine. The Windows machine is simply another server as far as WSL2 is concerned.

    Cheers
    jimbo
     
    jimbo45, Jun 15, 2020
    #3
  4. Johan45 Win User

    Weird SSH issue with WSL2 and WSL1

    AMD FX OC'ers Club

    That's what the auto setting will do since you're over the 1333 mark it jumps to the next step which isn't listed or officially supported I assume by that ram.

    At this point though I would suggest dropping the multi one step or .5 so that we can get something stable and possibly take the heat issue out of the picture for now.
     
    Johan45, Jun 15, 2020
    #4
Thema:

Weird SSH issue with WSL2 and WSL1

Loading...
  1. Weird SSH issue with WSL2 and WSL1 - Similar Threads - Weird SSH issue

  2. Can't change WSL1 to WSL2

    in Windows 10 Gaming
    Can't change WSL1 to WSL2: These past couple of days I've bene trying to install Kali Linux on Windows 10 using WSL. However, whatever I do I just get the same error: Error: 0x80041002.I've done some research on what to do and here's the full list of what I've done so far:Clearing Lxss registry key....
  3. Can't change WSL1 to WSL2

    in Windows 10 Software and Apps
    Can't change WSL1 to WSL2: These past couple of days I've bene trying to install Kali Linux on Windows 10 using WSL. However, whatever I do I just get the same error: Error: 0x80041002.I've done some research on what to do and here's the full list of what I've done so far:Clearing Lxss registry key....
  4. Can't change WSL1 to WSL2

    in Microsoft Windows 10 Store
    Can't change WSL1 to WSL2: These past couple of days I've bene trying to install Kali Linux on Windows 10 using WSL. However, whatever I do I just get the same error: Error: 0x80041002.I've done some research on what to do and here's the full list of what I've done so far:Clearing Lxss registry key....
  5. SSH connection From Mac to WSL2 ubuntu bash

    in Windows 10 Gaming
    SSH connection From Mac to WSL2 ubuntu bash: Hi there, I enabled ssh connection from a Mac to WSL2 ubuntu following these steps-> https://www.hanselman.com/blog/the-easy-way-how-to-ssh-into-bash-and-wsl2-on-windows-10-from-an-external-machineThe first connection works well, but after terminating the session and start...
  6. SSH connection From Mac to WSL2 ubuntu bash

    in Windows 10 Software and Apps
    SSH connection From Mac to WSL2 ubuntu bash: Hi there, I enabled ssh connection from a Mac to WSL2 ubuntu following these steps-> https://www.hanselman.com/blog/the-easy-way-how-to-ssh-into-bash-and-wsl2-on-windows-10-from-an-external-machineThe first connection works well, but after terminating the session and start...
  7. How to set Linux Distribution version to WSL1 or WSL2 in Windows 10

    in Windows 10 News
    How to set Linux Distribution version to WSL1 or WSL2 in Windows 10: [ATTACH]When you have Windows Subsystem for Linux (WSL) enabled, you can install Linux distribution apps […] This article How to set Linux Distribution version to WSL1 or WSL2 in Windows 10 first appeared on TheWindowsClub.com. read more...
  8. Setting up SSH in WSL2

    in Windows 10 Customization
    Setting up SSH in WSL2: Hey there! I have been using Ubuntu 20.04 on WSL2. I have successfully installed SSH in it, but while trying to connect with my IP Address, it shows the error "ssh: connect to host <IP Address> port 22: connection refused". I have already tested the same installation...
  9. confusion after WSL1 to WSL2 upgrade

    in Windows 10 Network and Sharing
    confusion after WSL1 to WSL2 upgrade: I ran through the Msft docs for updating from WSL1 to WSL2, including updating the WSL2 linux kernel. No problems, worked just like the guide. Then I ran into this strangeness. If I open Powershell and type bash, and type wsl.exe -l -v, it says Ubuntu, Running 2. If I...
  10. WSL2 & VMWare compatibility issues

    in Windows 10 Ask Insider
    WSL2 & VMWare compatibility issues: After upgrading to WSL2 (which seems to enable Hyper-V features through the "Virtual Machine Platform" features, even if "Windows Hypervisor Platform" is left unchecked), I haven't been able to run VMWare, getting the error "VMware Workstation and Device/Credential Guard are...