Details, refer to, Configure the ssh client, Below – H3C Technologies H3C S5120 Series Switches User Manual

Page 500

Advertising
background image

1-22

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

to the user.

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

publickey Switch001

2) Configure the SSH client

# Configure an IP address for Vlan interface 1.

<SwitchA> system-view

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] ip address 10.165.87.137 255.255.255.0

[SwitchA-Vlan-interface1] quit

# Generate a DSA key pair.

[SwitchA] public-key local create dsa

# Export the DSA public key to the file key.pub.

[SwitchA] public-key local export dsa ssh2 key.pub

[SwitchA] quit

After generating a key pair on a client, you need to transmit the saved public key file to the server

through FTP or TFTP and have the configuration on the server done before continuing configuration of

the client.

# Establish an SSH connection to the server (10.165.87.136).

<SwitchA> ssh2 10.165.87.136

Username: client002

Trying 10.165.87.136 ...

Press CTRL+K to abort

Connected to 10.165.87.136 ...

The Server is not authenticated. Continue? [Y/N]:y

Do you want to save the server public key? [Y/N]:n

Later, you will find that you have logged into Switch B successfully.

Advertising