clear ssh
To terminate an incoming or outgoing Secure Shell (SSH) connection, use the clear ssh command.
clear ssh {session-id| outgoing session-id}
Syntax Description
Session ID number of an incoming connection as displayed in the show ssh
command output. Range is from 0 to 1024.
session-id
Specifies the session ID number of an outgoing connection as displayed in the
show ssh command output. Range is from 1 to 10.
outgoing session-id
Command Default
None
Command Modes
EXEC
Command History
ModificationRelease
This command was introduced.Release 2.0
Usage Guidelines
Use the clear ssh command to disconnect incoming or outgoing SSH connections. Incoming connections are
managed by the SSH server running on the local networking device. Outgoing connections are initiated from
the local networking device.
To display the session ID for a connection, use the show ssh command.
Task ID
OperationsTask ID
executecrypto
Examples
In the following example, the show ssh command is used to display all incoming and outgoing connections
to the router. The clear ssh command is then used to terminate the incoming session with the ID number 0.
RP/0/RP0/CPU0:router# show ssh
SSH version: Cisco-2.0
session pty location state userid host ver
--------------------------------------------------------------------
Incoming sessions
0 vty0 0/33/1 SESSION_OPEN cisco 172.19.72.182 v2
Cisco IOS XR System Security Command Reference for the Cisco CRS Router, Release 4.1
256 OL-24740-01
Secure Shell Commands
clear ssh