5

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:

enter image description here

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.

  • I'm not sure OpenConnect works that way. – Thomas Ward Apr 3 '16 at 13:29
  • If 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. – Kyle H Dec 11 '16 at 22:45
  • I'm getting "No manual entry for network-manager-openconnect" unfortunately. – My other car is a cadr Dec 12 '16 at 5:06
8

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
  • in ubuntu 18.04 openconnect does not have --no-cert-check, any suggestions ? – Mehrdad Pedramfar Sep 23 '18 at 12:48
  • 1
    @MehrdadPedramfar For newer openconnect version after you enter this answer's code, error message give you the cert code. and you can use it. – SirSaleh Feb 27 '19 at 10:17

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.