It is very useful to script interactive CLI, by writing each respond as a new line. EOM is called here-docs, which uses a string to replace a file. /opt/cisco/anyconnect/bin/vpn connect -s enters non-interactivel mode.If you are not familiar with bash script, read below for explanation: Using this approach, you don't need to type in your vpn password every time, and you won't write your password to files without encryption. $(sudo security find-generic-password -ws fookey) # vpn password opt/cisco/anyconnect/bin/vpn connect -s << EOMĠ # doesn't require two factor authorization Run the following bash script to connect.Save foo and bar pair in Keychain (login not iCloud) with name fookey.If you are using macOS, I recommend to save your vpn password in Keychain, then request it from your Anyconnect script.įor example, say I want to connect to with account foo and password bar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |