H3C Technologies H3C WX3000E Series Wireless Switches User Manual
Page 321
307
# Configure an IP address for VLAN-interface 2.
<AC> system-view
[AC] interface vlan-interface 2
[AC-Vlan-interface2] ip address 10.165.87.137 255.255.255.0
[AC-Vlan-interface2] quit
# Generate RSA key pairs.
[AC] public-key local create rsa
# Export the host public key to the file key.pub.
[AC] public-key local export rsa ssh2 key.pub
[AC] quit
# Transmit the saved public key file to the server through FTP or TFTP. (Details not shown.)
2.
Configure the SSH server:
# Generate RSA key pairs and enable SSH server.
<Switch> system-view
[Switch] public-key local create rsa
[Switch] ssh server enable
# Configure an IP address for VLAN-interface 2, which the SSH client will use as the destination for
SSH connection.
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ip address 10.165.87.136 255.255.255.0
[Switch-Vlan-interface2] quit
# Set the authentication mode for the user interfaces to AAA.
[Switch] user-interface vty 0 4
[Switch-ui-vty0-4] authentication-mode scheme
# Enable the user interfaces to support SSH.
[Switch-ui-vty0-4] protocol inbound ssh
# Set the user command privilege level to 3.
[Switch-ui-vty0-4] user privilege level 3
[Switch-ui-vty0-4] quit
# Import the peer public key from the file key.pub.
[Switch] public-key peer key001 import sshkey key.pub
# Specify the authentication type for user client002 as publickey, and assign the public key
key001 to the user.
[Switch] ssh user client002 service-type stelnet authentication-type publickey assign
publickey key001
3.
Establish an SSH connection to the server 192.168.1.40.
<AC> ssh2 192.168.1.40
Username: client002
Trying 192.168.1.40 ...
Press CTRL+K to abort
Connected to 192.168.1.40 ...
The Server is not authenticated. Continue? [Y/N]:y
Do you want to save the server public key? [Y/N]:n
**************************************************************************
- H3C WX5500E Series Access Controllers H3C WX3500E Series Access Controllers H3C WX2500E Series Access Controllers H3C WX6000 Series Access Controllers H3C WX5000 Series Access Controllers H3C LSWM1WCM10 Access Controller Module H3C LSUM3WCMD0 Access Controller Module H3C LSUM1WCME0 Access Controller Module H3C LSWM1WCM20 Access Controller Module H3C LSQM1WCMB0 Access Controller Module H3C LSRM1WCM2A1 Access Controller Module H3C LSBM1WCM2A0 Access Controller Module H3C WA3600 Series Access Points H3C WA2600 Series WLAN Access Points H3C S10500 Series Switches H3C S5800 Series Switches H3C S5820X Series Switches H3C S12500 Series Switches H3C S9500E Series Switches H3C MSR 5600 H3C MSR 50 H3C MSR 3600 H3C MSR 30 H3C MSR 2600 H3C MSR 20-2X[40] H3C MSR 20-1X H3C MSR 930 H3C MSR 900 H3C SR8800 H3C SR6600-X H3C SR6600 H3C SecPath F5020 H3C SecPath F5040 H3C VMSG VFW1000