none
Is it not possible to SSH to virtual machines with WSL2? RRS feed

  • 問題

  • Hi there,

    I am using Windows Subsystem for Linux 2 in build 18999; I have a virtual machine running in HyperV that has an IP address of 172.19.196.42, and the WSL2 VM has an IP of 172.30.1.24/20, a different subnet entirely.  Currently, because the WSL2 VM is behind a NAT, I can't SSH to the HyperV VM from WSL2, I have to do so from PowerShell or something on the native host.

    Is there a way to bridge the connection behind the NAT for WSL2, or have the VM bridged across the host connection to remove the NAT entirely?  This would be useful for other things as well; running containers in podman/docker in WSL2 with listening ports would be accessible over the network, and not only by the host system over the NAT.  If this isn't a current feature, where can I make a request for WSL2 VM's to have a bridged connection to the host and the network the host is on, instead of a NAT?

    Thanks!

    2019年10月17日 上午 04:19

所有回覆

  • Hi

    Since your query is more related to WSL, I would suggest you have this asked in WSL forum.

    It’s a right place you could get more information.

    https://github.com/Microsoft/WSL

    Hope this can help you, if you have anything unclear, please let me know.

    Best regards,

    Ellen




    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.



    2019年10月18日 上午 07:22
  • Hi,
     
    Just checking in to see if the information provided was helpful.
    Please let us know if you would like further assistance.
     
    Best Regards,
    Ellen


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    2019年10月21日 上午 02:17
  • Hi,
    You could mark the useful reply as answer if you want to end this thread up.
    If there is anything else we can do for you, please feel free to post in the forum.
    Best Regards,
    Ellen


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    2019年10月22日 上午 01:39
  • Hi,
    As this thread has been quiet for a while, we will propose it as ‘Answered’ as the information provided should be helpful.
    If you need further help, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.
    Best regards,
    Ellen


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    2019年10月23日 上午 02:10