Guest User

Untitled

a guest
Aug 15th, 2018
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. ## Cisco AnyConnect: auto login in silent mode via command line
  2.  
  3. This gist is for Linux. For windows is similar.
  4.  
  5. ### Connect
  6.  
  7. create a file `.login_info` as below:
  8.  
  9. connect your.server.url
  10. usernanme
  11. password
  12. (blank line)
  13.  
  14. create a script as below
  15.  
  16. /opt/cisco/anyconnect/bin/vpn -s < .login_info
  17.  
  18. ### Trouble shooting
  19.  
  20. The input (content of `.login_info`) may vary according to your settings. Try VPN shell to determine your inputs.
  21.  
  22. Run
  23. `/opt/cisco/anyconnect/bin/vpn -s`
  24.  
  25. Now you are in command shell:
  26. `VPN>`
  27.  
  28. Connect your server:
  29. `VPN> connect your.vpn.server`
  30.  
  31. Input what asked, for me it's below:
  32. `Username: [xxxxx] xxxxx`
  33. `Password: xxxxxx`
  34.  
  35. Exit from VPN shell:
  36. `VPN> exit (or return) `
  37.  
  38. Remember what you typed, and save them into the `.login_info` file.
  39.  
  40.  
  41. ### Disconnect
  42. With this approach, the icon will not show in the taskbar, you need run command line `vpn disconnect` to disconnect.
Add Comment
Please, Sign In to add comment