Tired of entering password every time connecting to Cisco VPN, here is the one click connect solution,
able to connect/disconnect in one click without entring password,
the password is supplied from Mac keychain automatically.
- Cisco VPN client
-
Create password in keychain
security add-generic-password -s SECRET_NAME -a ACCOUNT_NAME -w 'VPN_PASSWORD'
https://blog.koehntopp.info/2017/01/26/command-line-access-to-the-mac-keychain.html
-
Install xbar https://github.com/matryer/xbar
-
Checkout this repo
-
Replace the following keys with actual values in vpn.1d.sh
- SYSTEM_USER_NAME
-
Replace the following keys with actual values in vpn/start.sh
- VPN_URL
- VPN_USERNAME
- SECRET_NAME
- ACCOUNT_NAME
-
Copy the files to ~/Library/Application Support/xbar/plugins/ directory
- plugins/vpn.1d.sh
- plugins/vpn/start.sh
- plugins/vpn/stop.sh
-
Restart/refresh the xbar