Windows 10: How to ssh into WSL 2 Ubuntu?

Discus and support How to ssh into WSL 2 Ubuntu? in Windows 10 Ask Insider to solve the problem; Please would someone be so kind as to provide a clear and neat set up for ssh-ing from an external machine into WSL 2, and that doesn't need re-doing... Discussion in 'Windows 10 Ask Insider' started by /u/lignumScientiae, Aug 14, 2020.

  1. How to ssh into WSL 2 Ubuntu?


    Please would someone be so kind as to provide a clear and neat set up for ssh-ing from an external machine into WSL 2, and that doesn't need re-doing each time the machine is restarted.

    TL;DR

    Please do not point me to a blog article unless you are *certain* it worked for you *very recently*.

    I switched to Apple/Linux in ~2005. Never expected to give Windows a second chance. But then started hearing goods things about linux integration, open-source package managers, etc. Figured I'd give it a try. Got a new workstation with Windows 10; planned to switch back to linux if it sucked. Installed Ubuntu 20.04, winget, the new terminal application, etc. At first glance, things looked promising.

    However, IMO, if you're going to provide access to a linux terminal then it is ROCK-BOTTOM BASIC to expect to be able to ssh into it. (Try googling "ssh into WSL 2" and you get NO official documentation from Microsoft, just a bunch of conflicting blog articles that don't explain or solve anything. Port 22 or 2222? Why?)

    I mean, if Microsoft are trying to win over the unix folk, then someone there has to stand up and determine to make the process and/or documentation for such basics as easy as possible.

    submitted by /u/lignumScientiae
    [link] [comments]

    :)
     
    /u/lignumScientiae, Aug 14, 2020
    #1

  2. How can I SSH into my WSL bash shell from an external enviroment

    Hi,

    I work between three different machines

    Windows 10 Laptop - using WSL

    Mac OS X

    Linux Ubuntu server - accessed via a console from a Linux machine

    I have files stored in all these locations.

    WSL - only used for editing files when I don't have access to primary dev environment

    Mac OS X - used for Adobe software

    Linux server - live environment

    I need to access, pull, push and edit files/directories in all these locations. I can do this between the Linux box and Mac OS X easily using SSH but I don't seem able to find a way to SSH into the WSL on my W10 laptop.

    Is this possible? If indeed it is possible, can you link me to the help materials for setting this up please. Pretty new to the WSL so sorry for the stupid noob question.

    Thanks

    Jay
     
    JayTelford, Aug 14, 2020
    #2
  3. james2020 Win User
    iperf cannot run in WSL Ubuntu

    I have installed WSL 2 and Ubuntu. I want to run iperf from this Ubuntu to connect to a linux server on my LAN.

    I get connection refused error from iperf-

    $ iperf -c 192.168.2.45
    connect failed: Connection refused

    ssh L: [email protected] works fine. I suspect port 5001 is blocked somehow.
    Iperf runs fine from windows to same linux server. How can I enable iperf to run from Ubuntu.

    - - - Updated - - -

    This was happening because ubuntu had iperf version 2 and server has iperf3.
    I installed iperf3 on ubuntu and now it works fine.
     
    james2020, Aug 14, 2020
    #3
  4. How to ssh into WSL 2 Ubuntu?

    Couldn't install Ubuntu 18.04 on WSL

    Just tried it. Still the same.

    Uninstalled Ubuntu 16,

    Turned off the WSL feature,

    Restarted comptuer

    Turned on the WSL feature

    Tried installing Ubuntu 18.
     
    vikneshdbz, Aug 14, 2020
    #4
Thema:

How to ssh into WSL 2 Ubuntu?

Loading...
  1. How to ssh into WSL 2 Ubuntu? - Similar Threads - ssh WSL Ubuntu

  2. Wsl Not installing ubuntu

    in Windows 10 Gaming
    Wsl Not installing ubuntu: one year ago i installed ubuntu and deleted is now i needed to install ubuntu wsl is not installing I have tried all the methods and deleted and reinstalled it many time but nothing happen I have reinstalled windows in new partition and tried to get wsl files and ext4.vdhx...
  3. Wsl Not installing ubuntu

    in Windows 10 Software and Apps
    Wsl Not installing ubuntu: one year ago i installed ubuntu and deleted is now i needed to install ubuntu wsl is not installing I have tried all the methods and deleted and reinstalled it many time but nothing happen I have reinstalled windows in new partition and tried to get wsl files and ext4.vdhx...
  4. WSL 2 - Can't install Ubuntu 22.04 - Can't use any Ubuntu with WSL 2

    in Windows 10 Software and Apps
    WSL 2 - Can't install Ubuntu 22.04 - Can't use any Ubuntu with WSL 2: Hi! I did a clean install of Win 11 Pro yesterday. I did Windows update and I'm current.I tried to use WSL and install Ubuntu 22.04 with the new GUI. I'm a developer and this is the reason I went to Windows 11!When I install from the store it dies while unpacking with a...
  5. WSL 2 - Can't install Ubuntu 22.04 - Can't use any Ubuntu with WSL 2

    in Windows 10 Gaming
    WSL 2 - Can't install Ubuntu 22.04 - Can't use any Ubuntu with WSL 2: Hi! I did a clean install of Win 11 Pro yesterday. I did Windows update and I'm current.I tried to use WSL and install Ubuntu 22.04 with the new GUI. I'm a developer and this is the reason I went to Windows 11!When I install from the store it dies while unpacking with a...
  6. Announcing Ubuntu on Windows Community Preview for WSL 2

    in Windows 10 News
    Announcing Ubuntu on Windows Community Preview for WSL 2: We are thrilled to release the Ubuntu on Windows Community Preview, a special build of Ubuntu for the Windows Subsystem for Linux (WSL) that serves as a sandbox for experimenting with new features and functionality. Over the past year, we have proudly hosted two WSL...
  7. WSL 2 Ubuntu

    in Windows 10 Customization
    WSL 2 Ubuntu: Hello Sir/Ma'am, I'm using Windows Subsystem for linux version 2 to use Ubuntu and recently I've found out that my Ubuntu terminal is not giving any output when I type "Who" command. Can anybody help me? Thank you....
  8. SSH client can't access WSL

    in Windows 10 Ask Insider
    SSH client can't access WSL: Hi! I'm connecting to my pc over ssh form my iPad. so far it works, but i need to open the ubuntu shell. Normally, in the cmd/pwsh i just type "ubuntu" and it works, but over ssh i'm getting this error: Program "ubuntu.exe" failed to run: The file cannot be accessed by the...
  9. Remove Ubuntu 14.04 from my Wsl 2

    in Windows 10 Installation and Upgrade
    Remove Ubuntu 14.04 from my Wsl 2: Hi!: I recently upgraded my Win10 version from 1909 to 2004 and along with it installed Ubuntu 20.04 on Wsl. In the previous version I had Ubuntu 14.04 installed. I don't need both. How do I remove the latter? Thanks for the help....
  10. SSH to wsl 2

    in Windows 10 Ask Insider
    SSH to wsl 2: Anyone know how to get ssh to work in windows wsl 2? I've followed some guides, but I'm still getting connection refused when I try to ssh into my windows ip, or it just hangs when I ssh into the wsl ip submitted by /u/MrDroo [link] [comments]...