Guest User

Untitled

a guest
Dec 28th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/usr/bin/expect
  2.  
  3. set username "mstiborsky\r"
  4. set config "/etc/openvpn/client/zonky.conf"
  5. set vpn_oauth_token [exec ykman oath code -s vpn]
  6.  
  7. spawn openvpn --config $config --auth-user-pass
  8. expect "Enter Auth Username:"
  9. send $username
  10. expect "Enter Auth Password:"
  11. send $vpn_oauth_token
  12. send "\r"
  13. interact
Add Comment
Please, Sign In to add comment