TomoyukiSugiyama / any-connect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AnyConnect CLI

By using AnyConnect CLI, it is easy to connect VPN. This tool need to use AnyConnect provided by cisco.

Setup

brew is a easy way to install AnyConnect CLI.

Install with brew

brew tap TomoyukiSugiyama/homebrew-tap
brew install tomoyukisugiyama/tap/any-connect

Download from releases

https://github.com/TomoyukiSugiyama/any-connect/releases

Build from sources

$ git clone git@github.com:TomoyukiSugiyama/any-connect.git
$ cd any-connect
$ go build
$ sudo ln -fs /path-your-current-dir/.cisco_vpn/any-connect /usr/local/bin/any-connect

Note Please install AnyConnect.

Usage

For general use, the any-connect config command is the fastest way to set up your AnyConnect cli. Configuration file is stored in ~/.cisco_vpn/credentials.

$ any-connect connect 
✔ YOUR_VPN_HOST
Group: YOUR_VPN_GROUP
User: USER_NAME
Password: **********

After configuration, you can use any-connect connect / disconnect command.

# connect vpn
# after execute connect commnad, 2FA is required
$ any-connect connect
# disconnect vpm
$ any-connect disconnect
# check state
$ any-connect state

Note If you want to use other command, please see help.

Completion

# ~/.zshrc
source <(any-connect completion zsh)
compdef _any-connect any-connect

About

License:MIT License


Languages

Language:Go 100.0%