Home > HP > Switch > HP A 5120 Manual

HP A 5120 Manual

Here you can view all the pages of manual HP A 5120 Manual. The HP manuals for Switch are available online for free. You can easily download all the documents as PDF.

Page 231

 
221 
 
1. Configure the SSH client 
# Generate the RSA key pairs. 
Run PuTTYGen.exe, select SSH-2 RSA and click Generate. 
Figure 61 Generate a key pair on the client 1) 
 
 
While  the  key  pair is  being  generated,  you must move  the  mouse  continuously and  keep  the  mouse off 
the  green  progress bar shown  in Figure  62.  Otherwise,  the progress bar stops moving and  the  key  pair 
generating process will be stopped.  

Page 232

 
222 
Figure 62 Generate a key pair on the client 2) 
 
 
After  the  key  pair  is  generated,  click Save  public  key and  specify  the  file  name  as key.pub to  save  the 
public key. 
Figure 63 Generate a key pair on the client 3) 
 
  

Page 233

 
223 
Likewise,  to  save the private  key,  click Save  private  key.  A warning  window  pops  up  to  prompt  you 
whether to save the private key without any protection. Click Yes and enter the name of the file for saving 
the key—private in this case.  
Figure 64 Save a key pair on the client 4)  
 
 
Then, transmit the public key file to the server through FTP or TFTP. 
2. Configure the SSH server 
# Generate the RSA key pairs. 
 system-view 
[Switch] public-key local create rsa 
The range of...

Page 234

 
224 
[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 client’s public key from file key.pub and name it Switch001. 
[Switch] public-key peer Switch001 import sshkey key.pub 
# Specify the authentication method for user client002 as publickey, and assign the public key Switch001 
to the user....

Page 235

 
225 
Figure 66 SSH client configuration interface 2) 
 
 
Click Open to  connect to  the server.  If  the  connection  is  normal,  you  will  be  prompted  to  enter  the 
username. After entering the username client002, you can enter the configuration interface of the server. 
SSH client configuration examples 
When switch acts as client for password authentication 
Network requirements 
As  shown in Figure  67,  Switch A (the SSH  client) must  pass  password  authentication to  log in to  Switch B...

Page 236

 
226 
[SwitchB] public-key local create rsa 
The range of public key size is (512 ~ 2048). 
NOTES: If the key modulus is greater than 512, 
It will take a few minutes. 
Press CTRL+C to abort. 
Input the bits of the modulus[default = 1024]: 
Generating Keys... 
++++++++ 
++++++++++++++ 
+++++ 
++++++++ 
# Generate a DSA key pair. 
[SwitchB] public-key local create dsa 
The range of public key size is (512 ~ 2048). 
NOTES: If the key modulus is greater than 512, 
It will take a few minutes. 
Press CTRL+C...

Page 237

 
227 
 system-view 
[SwitchA] interface vlan-interface 1 
[SwitchA-Vlan-interface1] ip address 10.165.87.137 255.255.255.0 
[SwitchA-Vlan-interface1] quit 
[SwitchA] quit 
 If  the  client  supports first-time authentication, the  client directly  establishes a  connection with the 
server. 
# Establish an SSH connection to server 10.165.87.136. 
 ssh2 10.165.87.136 
Username: client001 
Trying 10.165.87.136 ... 
Press CTRL+K to abort 
Connected to 10.165.87.136 ... 
 
The Server is not authenticated....

Page 238

 
228 
8716261214A5A3B493E866991113B2D 
[SwitchA-pkey-key-code]485348 
[SwitchA-pkey-key-code] public-key-code end 
[SwitchA-pkey-public-key] peer-public-key end 
# Specify the host public key for the SSH server—10.165.87.136—as key1. 
[SwitchA] ssh client authentication server 10.165.87.136 assign publickey key1 
[SwitchA] quit 
# Establish an SSH connection to server 10.165.87.136. 
 ssh2 10.165.87.136 
Username: client001 
Trying 10.165.87.136 
Press CTRL+K to abort 
Connected to 10.165.87.136......

Page 239

 
229 
Press CTRL+C to abort. 
Input the bits of the modulus[default = 1024]: 
Generating Keys... 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
+++++++++++++++++++++++++++++++++++ 
# Export the DSA public key to file key.pub. 
[SwitchA] public-key local export dsa ssh2 key.pub 
[SwitchA] quit 
Then, transmit the public key file to the server through FTP or TFTP. 
2. Configure the SSH server 
# Generate the RSA key pairs. 
 system-view 
[SwitchB] public-key local...

Page 240

 
230 
# Set the user command privilege level to 3. 
[SwitchB-ui-vty0-4] user privilege level 3 
[SwitchB-ui-vty0-4] quit 
# Import the peer public key from the file key.pub. 
[SwitchB] public-key peer Switch001 import sshkey key.pub 
# Specify the authentication method 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 
3. Establish a connection between the...
Start reading HP A 5120 Manual

Related Manuals for HP A 5120 Manual

All HP manuals