Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/expect
- set username "mstiborsky\r"
- set config "/etc/openvpn/client/zonky.conf"
- set vpn_oauth_token [exec ykman oath code -s vpn]
- spawn openvpn --config $config --auth-user-pass
- expect "Enter Auth Username:"
- send $username
- expect "Enter Auth Password:"
- send $vpn_oauth_token
- send "\r"
- interact
Add Comment
Please, Sign In to add comment