Guest User

Untitled

a guest
Jan 17th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. OpenConnect can be installed via homebrew:
  2.  
  3. brew update
  4. brew install openconnect
  5.  
  6. Running openconnect requires sudo, presumably because it affects resolution of DNS, but you can add password-less sudo ability for the openconnect command.
  7.  
  8. Open:
  9.  
  10. sudo visudo -f /etc/sudoers
  11.  
  12.  
  13. Add this line:
  14.  
  15. %admin ALL=(ALL) NOPASSWD: /usr/local/bin/openconnect
  16.  
  17. Entering password each time, when you connect to VPN, can be annoying, so you can store it in the keychain.
  18.  
  19. Open "Keychain Access" app, click "File -> New password item". Once it's created, you can access it from the command line using`security find-generic-password -s <keychain_item_name> -w`.
  20.  
  21. security find-generic-password -s vpn -w | sudo openconnect --user <username> <host>
Add Comment
Please, Sign In to add comment