HP 3PAR OS 3.1.3 CLI Administrator's Manual
2. Create a key pair using the ssh–keygen utility. Both rsa and dsa key formats are supported
by the system, and the recommended key length is at least 2048 bits. The RSA key format is
more secure therefore preferred over the DSA key format.
NOTE: For additional information about the ssh–keygen utility and rsa and dsa key formats,
consult the SSH client documentation.
To create a key pair using rsa format:
$ ssh–keygen –b 1024 –t rsa
To create a key pair using dsa format:
$ ssh–keygen –b 1024 –t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/usr/user3/.ssh/id_dsa):
Created directory '/home/usr/user3/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/usr/user3/.ssh/id_dsa.
Your public key has been saved in /home/usr/user3/.ssh/id_dsa.pub.
The key fingerprint is:
3f:a0:b5:6a:4d:dd:45:76:37:fb:a3:3e:52:44:55:32 user3@3pardata.com
The ssh–keygen utility generates two files: id_dsa (private) and id_dsa.pub(public) (or
id_rsa and id_rsa.pub).
• Generate the key with or without a pass phrase.
When the key is generated with a pass phrase, your private key is encrypted and
stored in the file.
◦
NOTE: The pass phrase must be entered and the private key decrypted before a
script is run. To decrypt the private key, run the ssh–agent and ssh–add commands
(see Step 6).
◦ When a pass phrase is not specified, the key is stored unencrypted in the file.
• Ensure that only the owner has access and read/write permission on the private key file,
otherwise the SSH client refuses the key file.
3. Log in to a system from any system with the SSH client installed.
$ssh user3@system1
user3@system1’s password: testpw3
4. Issue the setsshkey command.
system1 cli% setsshkey
setsshkey
Please enter the SSH public key below. When finished, press enter twice. The
key is usually long. It's better to copy it from inside an editor and paste it
here. (Please make sure there is no extra blanks.)
ssh–rsa AF5afPdciUTJ0PYzB6msRxFrCuDSqDwPshqWS5tGCFSoSZdE= user3’s pubic key
SSH public key successfully set!
62 Running the HP 3PAR Command Line Interface