If you run the CLI in interactive
mode, it provides its own prompt. You can also use the command line.
IP address or alias—Client establishes a connection to a
disconnect—Client closes a previously established connection
stats—Displays statistics about an established connection
quit—Exits the CLI interactive mode
exit—Exits the CLI interactive mode
The following examples show the user establishing and terminating
a connection from the command line:
Establishes a connection to a security appliance with the address
220.127.116.11. After contacting the requested host, the AnyConnect client
displays the group to which the user belongs and asks for the user's username
and password. If you have specified that an optional banner be displayed, the
user must respond to the banner. The default response is n, which terminates
the connection attempt. For example:
VPN > connect 18.104.22.168
>>contacting host (22.214.171.124) for login information...
>>Please enter your username and password.
>>notice: Please respond to banner.
STOP! Please read. Scheduled system maintenance will occur tonight from 1:00-2:00 AM for one hour.
The system will not be available during that time.
accept? [y/n] y
>> notice: Authentication succeeded. Checking for updates...
>> state: Connecting
>> notice: Establishing connection to 126.96.36.199.
>> State: Connected
>> notice: VPN session established.
Displays statistics for the current connection; for example:
VPN > stats
Time Connected: 01:17:33
Client Address: 192.168.23.45
Server Address: 188.8.131.52
Tunneling Mode: All traffic
Protocol Cipher: RSA_AES_256_SHA1
Protocol Compression: None
Bytes (sent/received): 1950410/23861719
Packets (sent/received): 18346/28851
Bypassed (outbound/inbound): 0/0
Discarded (outbound/inbound): 0/0
Closes a previously established connection; for example:
VPN > disconnect
>> state: Disconnecting
>> state: Disconnected
>> notice: VPN session ended.
quit or exit
Either command exits the CLI interactive mode; for example:
Linux or Mac OS X
/opt/cisco/anyconnect/bin/vpn connect 184.108.40.206
Establishes a connection to an ASA with the address 220.127.116.11
/opt/cisco/anyconnect/bin/vpn connect some_asa_alias
Establishes a connection to an ASA by reading the profile and looking
up the alias
some_asa_aliasin order to find its address
Displays statistics about the vpn connection
Disconnect the vpn session if it exists