Windows 10: Setting up SSH in WSL2

Discus and support Setting up SSH in WSL2 in Windows 10 Customization to solve the problem; 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... Discussion in 'Windows 10 Customization' started by Gorakh Nath Sharma, Oct 23, 2020.

  1. 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 procedure in Ubuntu 20.04 and it worked great. What is wrong with WSL or WSL2? Please help!

    Setting up SSH in WSL2 f4eb6087-fcca-4a20-b571-1a45b850474c?upload=true.png

    :)
     
    Gorakh Nath Sharma, Oct 23, 2020
    #1
  2. IonutIT Win User

    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.
     
    IonutIT, Oct 23, 2020
    #2
  3. WSL2 for windows

    I have failed into installing WSL for Windows. I have read here: https://docs.microsoft.com/en-us/win.../install-win10 how to do it, and at step 4:


    1. Download the latest package:
      [COLOR=var(--text)][COLOR=var(--info-dark)] Note[/COLOR]
      If you're using an ARM64 machine, please download the ARM64 package instead. If you're not sure what kind of machine you have, open Command Prompt or PowerShell and enter: systeminfo | find "System Type".
      [/COLOR]
    2. Run the update package downloaded in the previous step. (Double-click to run - you will be prompted for elevated permissions, select ‘yes’ to approve this installation.)

    I encountered:


    Setting up SSH in WSL2 [​IMG]


    and


    Setting up SSH in WSL2 [​IMG]


    What I did wrong ? I have the following W10 version:

    Setting up SSH in WSL2 [​IMG]


    Another question: am I in the the right forum ?
     
    mesajflaviu, Oct 23, 2020
    #3
  4. Johan45 Win User

    Setting up SSH in WSL2

    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, Oct 23, 2020
    #4
Thema:

Setting up SSH in WSL2

Loading...
  1. Setting up SSH in WSL2 - Similar Threads - Setting SSH WSL2

  2. Password Less SSH between postgres and barman users in WSL2 - Not Working

    in Windows 10 Gaming
    Password Less SSH between postgres and barman users in WSL2 - Not Working: HelloI have Installed Windows Subsystem for Linux on a windows 10 Pro machine. I have installed two software packages in itPostgreSQL database packages for which "postgres" is the user 2Barman Packages for which "barman" is the user.I'm trying to establish "password less SSH...
  3. Password Less SSH between postgres and barman users in WSL2 - Not Working

    in Windows 10 Software and Apps
    Password Less SSH between postgres and barman users in WSL2 - Not Working: HelloI have Installed Windows Subsystem for Linux on a windows 10 Pro machine. I have installed two software packages in itPostgreSQL database packages for which "postgres" is the user 2Barman Packages for which "barman" is the user.I'm trying to establish "password less SSH...
  4. Password Less SSH between postgres and barman users in WSL2 - Not Working

    in Windows 10 Customization
    Password Less SSH between postgres and barman users in WSL2 - Not Working: HelloI have Installed Windows Subsystem for Linux on a windows 10 Pro machine. I have installed two software packages in itPostgreSQL database packages for which "postgres" is the user 2Barman Packages for which "barman" is the user.I'm trying to establish "password less SSH...
  5. WSL2

    in Windows 10 Software and Apps
    WSL2: Hello,Could anyone please tell me whether WSL2 has any kind of connection to the internet or external network or application/service?Thanks in advance!Kind regards,Oliver Jenkins https://answers.microsoft.com/en-us/windows/forum/all/wsl2/788253f6-ebec-44ef-987f-29a2d5cb1fd1
  6. 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...
  7. 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...
  8. WSL2

    in Windows 10 Network and Sharing
    WSL2: Hello thereI've been trying to make wsl2 work on my surface pro 5 but I find myself unable to make sense of the range of suggestions from forums.The problem is that wsl can't connect to the internet, and so far I've tried to change the wsl.conf file according to this...
  9. Weird SSH issue with WSL2 and WSL1

    in Windows 10 Customization
    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...
  10. SSH

    in AntiVirus, Firewalls and System Security
    SSH: Hello everyone.. Am looking some help with my Open SSH Private and Public Key..Windows 10 Professorial. I Enable the ssh run's the Common ssh-keygen and it ask for a password and I did put an Password but now that I need the Public Key to use as the Password and I have no...