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 03 '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 05:06

1 Answers1

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
Fabby
  • 34,341
  • 38
  • 97
  • 191
A. Ahanchi
  • 171
  • 2
  • 9