C613-50170-01 Rev B
Command Reference for x510 Series
2700
AlliedWare Plus™ Operating System - Version 5.4.7-1.x
S
ECURE
S
HELL
(SSH) C
OMMANDS
CRYPTO
KEY
PUBKEY
-
CHAIN
USERKEY
crypto key pubkey-chain userkey
Overview
This command adds a public key for an SSH user on the SSH server. This allows the
SSH server to support public key authentication for the SSH user. When
configured, the SSH user can access the SSH server without providing a password
from the remote host.
The
no
variant of this command removes a public key for the specified SSH user
that has been added to the public key chain. When a SSH user’s public key is
removed, the SSH user can no longer login using public key authentication.
Syntax
crypto key pubkey-chain userkey <
username
> [<
filename
>]
no crypto key pubkey-chain userkey <
username
> <
1-65535
>
Mode
Global Configuration
Usage
You should import the public key file from the client node. The device can read the
data from a file on the flash or user terminal.
Or you can add a key as text into the terminal. To add a key as text into the terminal,
first enter the command
crypto key pubkey-chain userkey <
username
>
, and hit
[Enter]. Enter the key as text. Note that the key you enter as text must be a valid SSH
RSA key, not random ASCII text. Use [Ctrl]+D after entering it to save the text and
re-enter the normal command line mode.
Note you can generate a valid SSH RSA key on the device first using the
crypto key
generate host rsa
command. View the SSH RSA key generated on the device using
the
show crypto hostkey rsa
command. Copy and paste the displayed SSH RSA
key after entering the
crypto key pubkey-chain userkey <
username
>
command.
Use [Ctrl]+D after entering it to save it.
Parameters
Description
<username>
Name of the user that the SSH server associates the key with. The
username must begin with a letter. Valid characters are all numbers,
letters, and the underscore, hyphen and full stop symbols.
Default: no default
<filename>
Filename of a key saved in flash. Valid characters are any printable
character. You can add a key as a hexadecimal string directly into the
terminal if you do not specify a filename.
<
1-65535
>
The key ID number of the user’s key. Specify the key ID to delete a key.