Automatically connect an Openconnect VPN connection
Does openconnect
work for you?
If so you can use this to connect automatically:
sudo openconnect SERVER --no-cert-check -u USERNAME --passwd-on-stdin <PASS_FILE
or
echo PASS | sudo openconnect SERVER --no-cert-check -u USERNAME --passwd-on-stdin
Related videos on Youtube
My other car is a cadr
Updated on September 18, 2022Comments
-
My other car is a cadr over 1 year
I installed the
network-manager-openconnect
package and uses it to login to my Openconnect VPN server. The connection works, except that every time I start the connection a two step dialog box pops up and asks for my VPN username and password:This is the first dialog which asks for the username. If the username is correct, it'll go to the second dialog and ask for the password.
Is there a way to provide the VPN username and password in a configuration file so that it doesn't ask for it every time? This is important since I'm trying to make this machine headless.
Or alternatively is there a way to have
network-manager-openconnect
get the username and password from the keyring, and have the keyring be automatically unlocked after login? I'm using Ubuntu 16.04 LTS Beta 2.-
Thomas Ward about 8 yearsI'm not sure OpenConnect works that way.
-
Kyle H over 7 yearsIf you run 'man network-manager-openconnect' does it display any options such as --passwd-on-stdin where you could use a shell script to echo your username and password into the network-manager-openconnect so it would auto-connect on boot? When I google the package, I don't see it's man page available online.
-
My other car is a cadr over 7 yearsI'm getting "No manual entry for network-manager-openconnect" unfortunately.
-
-
Mehrdad Pedramfar over 5 yearsin ubuntu
18.04
openconnect does not have--no-cert-check
, any suggestions ? -
SirSaleh about 5 years@MehrdadPedramfar For newer
openconnect
version after you enter this answer's code, error message give you thecert
code. and you can use it.