Skip to content
Stuff I'm Up To
Go back

OpenVPN Client in the Background

Edit page

With 2FA/MFA and OpenVPN on Linux you need to use the terminal to start up the session.

sudo openvpn user.name.ovpn

You then get to see all the prompts for username, password, OTP and certificate key passphrase. The only trouble is you get to see it in a terminal all day and you can’t close it.

Run it inside a screen session instead!

screen -dmS vpn
screen -x vpn
sudo openvpn user.name.ovpn

Then CTRL+A+D to detach yourself. You can close the terminal and come back to it inside any new terminal using:

screen -x vpn

Edit page
Share this post:

Previous Post
Restic and Backblaze B2
Next Post
OpenVPN MFA and PAM