beautypg.com

H3C Technologies H3C S5120 Series Switches User Manual

Page 493

background image

1-15

Before performing the following tasks, you must use the client software to generate an RSA key pair on

the client, save the public key in a file named key.pub, and then upload the file to the SSH server

through FTP or TFTP. For details, refer to

Configure the SSH client

below.

# Import the client’s public key from file key.pub and name it Switch001.

[Switch] public-key peer Switch001 import sshkey key.pub

# Specify the authentication type for user client002 as publickey, and assign the public key Switch001

to the user.

[Switch] ssh user client002 service-type stelnet authentication-type publickey assign

publickey Switch001

2) Configure the SSH client

# Generate an RSA key pair.

Run PuTTYGen.exe, select SSH-2 RSA and click Generate.

Figure 1-4 Generate a client key pair 1)

While generating the key pair, you must move the mouse continuously and keep the mouse off the

green process bar shown in

Figure 1-5

. Otherwise, the process bar stops moving and the key pair

generating process will be stopped.