display public-key peer

Syntax

display public-key peer [ brief | name publickey-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

brief: Displays brief information about all peer public keys saved on the local device.

name publickey-name: Displays information about a peer public key saved on the local device. The publickey-name argument represents a public key by its name, a case-sensitive string of 1 to 64 characters.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display public-key peer to display information about the specified or all peer public keys on the local device.

With neither the brief keyword nor the name publickey-name option specified, the command displays detailed information about all locally saved peer public keys.

You can use the public-key peer command or the public-key peer import sshkey command to get a local copy of a peer public key.

Related commands: public-key peer and public-key peer import sshkey.

Examples

# Display detailed information about the peer host public key named idrsa saved on the local device.

<Sysname> display public-key peer name idrsa
=====================================
  Key Name  : idrsa
  Key Type  : RSA
  Key Module: 1024
=====================================
Key Code:
30819D300D06092A864886F70D010101050003818B00308187028181009C46A8710216CEC0C01C7CE136BA76C79AA6040E79F9E305E453998C7ADE8276069410803D5974F708496947AB39B3F39C5CE56C95B6AB7442D56393BF241F99A639DD02D9E29B1F5C1FD05CC1C44FBD6CFFB58BE6F035FAA2C596B27D1231D159846B7CB9A7757C5800FADA9FD72F65672F4A549EE99F63095E11BD37789955020123

Table 32: Command output

Field

Description

Key Name

Name of the public key.

Key Type

Key type, RSA or DSA.

Key Module

Key modulus length in bits.

Key Code

Public key data.

# Display brief information about all locally saved peer public keys.

<Sysname> display public-key peer brief
Type  Module  Name
---------------------------
RSA   1024    idrsa
DSA   1024    10.1.1.1

Table 33: Command output

Field

Description

Type

Key type, RSA or DSA.

Module

Key modulus length in bits.

Name

Name of the public key.