Windows 10: SSH connection From Mac to WSL2 ubuntu bash

Discus and support SSH connection From Mac to WSL2 ubuntu bash in Windows 10 Software and Apps to solve the problem; Hi there, I enabled ssh connection from a Mac to WSL2 ubuntu following these steps->... Discussion in 'Windows 10 Software and Apps' started by Joao Vieira-Ribeiro, Jan 13, 2022.

  1. 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 again, the connection is not successeful. The sshd log from the Windows side shows:degub3: pty commandline: C:\\\\WINDOWS\\\\system32\\\\conhost.exe --headless --width 138 --height 37 --signal 0x1fc -- "c:\\\\windows\\\\system32\\\\bash.exe"debug2: fd 5 setting TCP_NODELAYdebug2: channel 0: rfd 14 isattydebug3: fd 14 is O

    :)
     
    Joao Vieira-Ribeiro, Jan 13, 2022
    #1

  2. 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!


    SSH connection From Mac to WSL2 ubuntu bash f4eb6087-fcca-4a20-b571-1a45b850474c?upload=true.png
     
    Gorakh Nath Sharma, Jan 13, 2022
    #2
  3. 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, Jan 13, 2022
    #3
  4. SSH connection From Mac to WSL2 ubuntu bash

    bash on ubuntu

    actually I'm very much glad to know why my bash on Ubuntu is not working on windows 10 on evalution copy build 14367.rs1 _release . 160613-1700 ... And you might also help me by sharing your valuable suggestions
     
    Bhaskarjyoti das, Jan 13, 2022
    #4
Thema:

SSH connection From Mac to WSL2 ubuntu bash

Loading...
  1. SSH connection From Mac to WSL2 ubuntu bash - Similar Threads - SSH connection Mac

  2. WSL2 & Ubuntu

    in Windows 10 Gaming
    WSL2 & Ubuntu: When trying to run ubuntu on windows subsystem it will not allow me to toggle on the subsystem feature. My virtualization is on. Do I need to change the boot mode from UEFI? Acer nitro windows 11. I've tried with a virtual box download to and it will not load ubuntu. Help!...
  3. WSL2 & Ubuntu

    in Windows 10 Software and Apps
    WSL2 & Ubuntu: When trying to run ubuntu on windows subsystem it will not allow me to toggle on the subsystem feature. My virtualization is on. Do I need to change the boot mode from UEFI? Acer nitro windows 11. I've tried with a virtual box download to and it will not load ubuntu. Help!...
  4. WSL2 Ubuntu problems

    in Windows 10 Gaming
    WSL2 Ubuntu problems: Hello everbody,i have the problem that my ubuntu with wsl2 is not running anymore after temporarily disabling Hyper-V in the Windows-Features.The information in the command window when i try to start is: Please activate the Windows-Feature "VM-Platform" and ensure that...
  5. WSL2 Ubuntu problems

    in Windows 10 Software and Apps
    WSL2 Ubuntu problems: Hello everbody,i have the problem that my ubuntu with wsl2 is not running anymore after temporarily disabling Hyper-V in the Windows-Features.The information in the command window when i try to start is: Please activate the Windows-Feature "VM-Platform" and ensure that...
  6. WSL2 - Ubuntu vs Ubuntu 20.04

    in Windows 10 Gaming
    WSL2 - Ubuntu vs Ubuntu 20.04: Hey,I am using WSL 2 Windows 11 and I noticed there is a generic Ubuntu version listed.What is the difference between Ubuntu and Ubuntu 20.04 LTS? What version is Ubuntu Name and Friendly Name...
  7. WSL2 - Ubuntu vs Ubuntu 20.04

    in Windows 10 Software and Apps
    WSL2 - Ubuntu vs Ubuntu 20.04: Hey,I am using WSL 2 Windows 11 and I noticed there is a generic Ubuntu version listed.What is the difference between Ubuntu and Ubuntu 20.04 LTS? What version is Ubuntu Name and Friendly Name...
  8. 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...
  9. 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...
  10. 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...