Shell function to fuzzy search an IPSec VPN by name and connect to it automatically.
brew install oath-toolkit fzf
brew tap thecasualcoder/stable
brew install lazy-connect
git clone https://github.com/thecasualcoder/lazy-connect.git ~/.lazy-connect
sudo ln -s ~/.lazy-connect/lazy-connect /usr/local/bin/lazy-connect
lazy-connect - Shell function to fuzzy search an IPSec VPN by name
and connect to it automatically.
-i - Initialize lazy-connect. Stores the TOTP secret and VPN list.
-r - Refresh vpn list in ~/.config/lazy-connect .
-n - Do not fill the password automatically. Instead copy the password to clipboard.
-h - Show this help.
To use TOTP
from YubiKey set the following environment variable
export LAZY_CONNECT_TOTP_GENERATOR=yubikey
export LAZY_CONNECT_TOTP_QUERY=<name of the issuer>
login
keychain. You may need to
enter your login password to allow access to Keychain.Security & Privacy -> Accessibility
. It is
necesssary because the script interacts with the UI. There are other ways via CLI to avoid UI interaction but
they are all broken in OS X 10.12+.