Created
March 19, 2022 19:29
-
-
Save ihebski/579e16f70d0ad48684d060aa79c68b66 to your computer and use it in GitHub Desktop.
Revisions
-
ihebski created this gist
Mar 19, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #!/usr/bin/expect -f # Constants set user "" set pass "" set timeout -1 # Options match_max 100000 log_user 0 # Access to device spawn sudo openvpn vpn_file.ovpn expect "*?sername:*" send -- "$user\r" expect "*?assword:*" send -- "$pass\r" interact close