show ssh
Lists the SSH sessions currently connected to the device, with version, cipher, state and username.
Written by a working field network engineer · CCNA, Security+, CySA+
Lists the SSH sessions connected to the device right now, with the encryption negotiated and who is logged in.
Example output
R1#show ssh
Connection Version Mode Encryption Hmac State Username
0 2.0 IN aes256-ctr hmac-sha2-256 Session started admin
0 2.0 OUT aes256-ctr hmac-sha2-256 Session started admin
%No SSHv1 server connections running.Reference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.
Useful variants
show users
What each column or field means
| Field | Meaning |
|---|---|
Connection | The VTY session number. |
Version | The SSH protocol version negotiated. |
Mode | IN and OUT: each session is listed once per direction. |
Encryption / Hmac | Cipher and integrity algorithm negotiated with the client. |
Username | The authenticated user. |
When it doesn’t look right
New SSH logins fail while old ones are connected.
All VTY lines may be in use. Check show users and clear stale sessions with clear line vty <n>; add exec-timeout so idle sessions close.
Related commands
Try it yourself
- Secure Device Access (SSH) (Pro)
- Local Accounts and Privilege Levels (Pro)
- Or build the example network in the free Sandbox
Learn it in the CCNA path
- Secure Shell (SSH) Configuration (5. Security Fundamentals)
- Enforce VTY login, idle timeout and login throttling (5. Security Fundamentals)
Topic
SSH and Device Hardening — Replace Telnet with SSH: domain name, RSA keys, local users, VTY transport and login rules, and how to verify each one.