CLI Reference Guide-R04

Table Of Contents
Chapter 8
| User Authentication Commands
Secure Shell
– 273 –
show public-key This command shows the public key for the specified user or for the host.
Syntax
show public-key [user [username]| host]
username – Name of an SSH user. (Range: 1-32 characters)
Default Setting
Shows all public keys.
Command Mode
Privileged Exec
Command Usage
If no parameters are entered, all keys are displayed. If the user keyword is
entered, but no user name is specified, then the public keys for all users are
displayed.
When an RSA key is displayed, the first field indicates the size of the host key
(e.g., 1024), the second field is the encoded public exponent (e.g., 35), and the
last string is the encoded modulus.
Example
Console#show public-key host
Host:
RSA:
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAuenyOKhEgP9asrdFKKBeC0QuiPK6KdV4/IxyKEZjphD+DQftSRcI
ApcSIIU3fN4nVBqdteQJqKJbQYGePyLxKcojuvHIbYCSbcmSqEIZ4ZcpmN1qIO4u
+NwC8RxcTHtTw2JlY7VRFugd7uQCkdmon4DpGPZbSlhXnazJVwygDF4ywTi3wtWq
NaHsAa69yYDwa3vCa+ELpUXu49jsR20TpRRs9Ui4mTpfcOJtC5Z/wUOgKBWhGGiF
lb+GFTmWvoJ1ulcfrsoPlC/shsVIqMUhDnw91FwMgIpDsD8rhUB2T8I8iuagOXO4
4fzuxdlLNYVcCHPCW/AGfbYHmwRsqOi6owIDAQAB
-----END RSA PUBLIC KEY-----
Console#
show ssh This command displays the current SSH server connections.
Command Mode
Privileged Exec
Example
Console#show ssh
Connection Version State Username Encryption
1 2.0 Session-Started admin ctos aes128-cbc-hmac-md5
stoc aes128-cbc-hmac-md5
Console#