Secure Shell Commands
©2008 Allied Telesis Inc. All rights reserved.
45.8
AlliedWare Plus
TM
Operating System Software Reference C613-50003-00 REV E
Software Version 5.2.1
crypto key pubkey-chain userkey
This command adds a public key for an SSH user onto the SSH server. This allows the server to
support public key authentication for the user. When configured, the user can access the SSH
server without providing a password from the remote host.
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.
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. Use Ctrl+D at the end to save the
text and re-enter the normal command line mode.
The no form removes a public key for the specified SSH user that has been added to the public
key chain. When a user’s public key is removed, the 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
Configure mode
Examples
To add a public key for the user "graydon" from the file "key.pub", use the command:
awplus(config)#
crypto key pubkey-chain userkey graydon key.pub
To add a public key for the user "tamara" from the terminal, use the command:
awplus(config)#
crypto key pubkey-chain userkey tamara
and enter the key. Use Ctrl+D to finish.
To remove the first key entry from the public key chain of the user ’john’, use the command:
awplus(config)#
no crypto key pubkey-chain userkey john 1
Related Commands
show crypto key pubkey-chain userkey
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.