I'm trying to connect to a remote server over SSH, for which I need to be connected to a VPN, whose settings I have in an *.ovpn file.

Command-line works

When I run: sudo openvpn --config path/to/ovpn/file (and enter my username and password when prompted), I can connect over SSH to the server as needed, and the WiFi works fine.


GUI doesn't work

When I use the Import a saved VPN configuration ... option in Network Connections to import the same *.ovpn file and then enter my username and password, change nothing else and save it, I get a completely different result.

I appear to connect to the VPN fine, but this reliably results in the WiFi not working, and the SSH fails too with: ssh: Could not resolve hostname <hostname>: Temporary failure in name resolution.

I can't figure out why the first method works, but the other doesn't. I thought the problem might be that I need sudo privileges for the connection to work, but my online searches indicate that the OpenVPN GUI runs with admin privileges by default.

  • 1
    If key files are required and they are in the same folder as the settings file you point to then, as expected, openvpn --config works. The GUI need to be configured to use those.
    – user589808
    Commented Feb 10, 2017 at 21:03


You must log in to answer this question.

Browse other questions tagged .