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. Trouble Setting Up SSH Key-Based Authentication from Windows to Linux Server

    in Windows 10 Software and Apps
    Trouble Setting Up SSH Key-Based Authentication from Windows to Linux Server: Hello, I am attempting to set up SSH key-based authentication to log into a Linux server from my Windows 10 machine. While I am able to login using a password, my goal is to enable public key login to avoid using a password each time.Linux SideThe public key has been added to...
  3. 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
  4. WSL2

    in Windows 10 Gaming
    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
  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. 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...
  8. About ssh

    in Windows 10 Network and Sharing
    About ssh: I am using ssh accounts to protect my privacy when i am browsing.Sometimes ssh account disconnects for few seconds and the automatically reconnect again.But even after ssh account disconnected my connection is still alive but not through ssh tunnel.----------1 We know some...
  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...