free ssh

Use free ssh to disconnect SSH sessions.

Syntax

free ssh { user-ip { ip-address | ipv6 ipv6-address } [ port port-number ] | user-pid pid-number | username username }

Views

User view

Predefined user roles

network-admin

mdc-admin

Parameters

user-ip: Specifies the user IP address of the SSH sessions to be disconnected.

ip-address: Specifies the user IPv4 address of the SSH sessions to be disconnected.

ipv6 ipv6-address: Specifies the user IPv6 address of the SSH sessions to be disconnected.

port port-number: Specifies the source port of the SSH session to be disconnected, in the range of 1 to 65535. If you do not specify a source port, this command disconnects all SSH sessions using the specified IP address.

user-pid pid-number: Specifies the user process ID of the SSH session to be disconnected, in the range of 1 to 2147483647. To view the user process ID of an SSH session, use the display ssh server session command.

username username: Specifies the username of the SSH session to be disconnected. To view the username of an SSH session, use the display ssh server session command.

Examples

# Disconnect the SSH sessions with user IPv4 address 192.168.15.45.

<Sysname> free ssh user-ip 192.168.15.45
Releasing SSH connection. Continue? [Y/N]:y

# Disconnect the SSH sessions with user IPv6 address 2000::11.

<Sysname> free ssh user-ip ipv6 2000::11
Releasing SSH connection. Continue? [Y/N]:y

# Disconnect the SSH session with user process ID 417.

<Sysname> free ssh user-pid 417
Releasing SSH connection. Continue? [Y/N]:y

# Disconnect the SSH session with username sshuser.

<Sysname> free ssh username sshuser
Releasing SSH connection. Continue? [Y/N]:y

Related commands

display ssh server session