![]() But he recommends against this for various reasons. Scott Hanselman also outlines another approach, where he doesn't replace the default ssh shell. I've opened up the related X11 ports in the firewall. ![]() I assume I need to somehow create a new display on the remote mobaXterm server and set DISPLAY to use that, but I don't know how to do this. If I'm running a WSL session already on the host as I explained in the first step I can manually set DISPLAY (ex: export DISPLAY=localhost:10.0) and that will work but not too surprisingly it will open the UI on the host machine rather than the remote machine. However, the DISPLAY shell variable isn't set and I can't run any UI apps. This allows me to ssh from the remote machine. To ssh from the remote machine I followed the steps outlined by x11 forwarding from WSL2 to remote machine: "THE EASY WAY how to SSH into Bash and WSL2 on Windows 10 from an external machine" This automatically sets the DISPLAY variable in the shell to something like 'localhost:10.0' where 10, the display number, will increment for ever session that is opened. ![]() From there launching UI apps works without any issues or changes to configuration. I create a WSL Session in MobaXterm and start it. It's currently easy to do this from the host machine. I'm assuming the approach would be similar using other tools. MobaXterm is the app I'm using for my ssh server and it has a built in X Server. The WSL2 host machine and remote machine are literally sitting beside each other and connected to the same switch on a private network so security shouldn't be an issue. I want to ssh to a WSL2 instance using X11 forwarding from another machine using MobaXterm.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |