2

If possible, I'd like to be able to connect to my university's HPC from within WSL via the windows terminal or VSCode integrated terminal. I've only tried to connect via the windows terminal. I am running Ubuntu 20.04.1 LTS. Here is what I have tried:

  1. In Windows, I create the VPN using Pulse. Then from within WSL I try to do ssh myUserName@University.edu. It fails and says Port 22: Resource Temporarily Unavailable
  2. In WSL I installed vpnc and created a MyUniversity.config and put it in /etc/vpnc/. Then I try to connect and I get the following error:
vpnc: can't open /dev/net/tun, check that it is either device char 10 200 or (with DevFS) a symlink to ../misc/net/tun (not misc/net/tun): No such device
vpnc: can't initialise tunnel interface: No such device

Any suggestions on a workaround or how to resolve either issue? Or is this just not supported and I'll have to work with something like MobaXterm in my windows environment?

3
  • From within WSL, can you ping University.edu when the Pulse (whatever that is) VPN is enabled? Is there a particular machine in the university that you would normally connect to, and if so can you ping that machine?
    – icarus
    Jan 11 at 0:11
  • How would I ping it? I am trying to connect to the login node of our HPC. If I was using MobaXTerm on windows I would do something like MyUniversityID@HPC.University.Edu while Pulse is connected.
    – Nukesub
    Jan 11 at 0:32
  • I just tried ping HPC.University.Edu and it just hung there. I did ctrl-C and it says 4 packets transmitted, 0 received, 100% packet loss
    – Nukesub
    Jan 11 at 0:37
0

There's a long, long issue on the WSL Github for the first part of this.

The simplest solution for your needs (a basic ssh client) may simply be to switch over to WSL1, as networking is handled differently there and it may work for that case. Your best bet there is to make a clone of your existing environment. From PowerShell or cmd:

  • wsl --export <distroname> mybackup.tar
  • wsl --import <newDistroName> <a directory name to hold the distro> mybackup.tar --version 1

Launch it using wsl -d <newDistroName>

If that doesn't work, or you really need WSL2 when connected to the vpn, there are a few possible workarounds, but one of the more promising seems to be this one. It's a link to a YouTube video, but essentially, it says to:

  • Disconnect from the VPN
  • Disable the WSL2 network interface (netsh interface set interface "vEthernet (WSL)" disable)
  • Connect to the VPN
  • Enable the WSL2 network interface (netsh interface set interface "vEthernet (WSL)" enable)

Per this comment, I think that the same steps can be accomplished with wsl --shutdown before starting the VPN as well.

I don't know whether that will work for Pulse, however.

There's also a report that the openconnect client seems to work for your second issue (VPN within WSL2) if that will work for Pulse.

1
  • Sorry for the confusion - I am only using WSL1 and want to connect to my university HPC via the windows terminal in WSL1, if possible.
    – Nukesub
    Jan 11 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.