173
To do…
Use the command…
Remarks
6.
Return to system view.
peer-public-key
end
—
Importing a client public key from a public key file
To do…
Use the command…
Remarks
1.
Enter system view.
system-view
—
2.
Import the public key from a
public key file.
public-key peer
keyname
import
sshkey
filename
Required
For more information about client public key configuration, see "
."
Configuring an SSH user
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 completing this
configuration task, be sure to configure the correct service type and authentication method. For
information about how to configure local authentication and remote authentication, see "
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 Stelnet or SFTP. For more information about Stelnet, see "
." For more information about SFTP, see "
Authentication methods include publickey authentication, password authentication, password-publickey
authentication (requiring both password and publickey authentication), and any authentication (requiring
either password or publickey authentication).
To configure an SSH user and specify the service type and authentication method:
To do…
Use the command…
Remarks
1.
Enter system view.
system-view
—
2.
Create an
SSH user,
and specify
the service
type and
authentication
method.
For Stelnet
users
ssh user
username
service-type
stelnet
authentication-type
{
password
| {
any
|
password-
publickey
|
publickey
}
assign
publickey
keyname
}
Required.
Use either command.
For all users
or SFTP users
ssh user
username
service-type
{
all
|
sftp
}
authentication-type
{
password
| {
any
|
password-
publickey
|
publickey
}
assign
publickey
keyname
work-
directory
directory-name
}