278
To do… Use the command…
Remarks
Return to public key view and save
the configured host public key
public-key-code end
—
When you exit public key code
view, the system automatically
saves the public key.
Return to system view peer-public-key end —
Importing a client public key from a public key file
Follow these steps to import a public key from a public key file:
To do… Use the command…
Remarks
Enter system view system-view —
Import the public key from a public
key file
public-key peer keyname import
sshkey filename
Required
NOTE:
For more information about client public key configuration, see the chapter “Public key configuration.”
Configuring an SSH user
NOTE:
• For an SSH user to pass publickey authentication to log in, you must create SSH user accounts, and
specify the server type, authentication method, and client public keys on the switch.
• For an SSH user to pass password authentication to log in, you do not need to complete this
configuration task on the local switch. Instead, you must create an SSH user account on a remote
authentication server—for example, a RADIUS authentication server—for remote authentication, or a
local user on the switch for local authentication. If you do create an SSH user account by completin
this
configuration task, be sure to configure the correct service type and authentication method. For how to
configure local authentication and remote authentication, see the chapter “AAA.”
This configuration task allows you to create an SSH user and specify the service type and authentication
method.
An SSH user’s service type can be Secure Telnet (Stelnet) or Secure FTP (SFTP). For more information
about Stelnet, see “SSH2.0 overview.
“
For more information about SFTP, see “SFTP overview.”
Authentication methods include publickey authentication, password authentication, password-publickey
authentication—requiring both password and publickey authentication, and any
authentication—requiring either of the password and publickey authentication.
Follow these steps to configure an SSH user and specify the service type and authentication method:
To do… Use the command…
Remarks
Enter system view system-view —
Create an SSH
user, and
specify the
service type
and
For Stelnet users
ssh user username service-type
stelnet authentication-type
{ password | { any |
password-publickey | publickey }
assign publickey keyname }
Required
Use either command.