HP 3PAR InForm OS 3.1.1 CLI Administrator's Manual
6. Terminate the CLI session by typing exit at the prompt.
<System–host–name> cli % exit
Newly created CLI users can access the CLI by following the instructions as explained earlier,
substituting their own user name, system name, and password when prompted.
CLI Scripting Through SSH
You can use SSH public key authentication to issue CLI commands in scripts. No password is
required, however you will need to generate a public/private key pair.
CAUTION: The file containing the private key must be protected from unwanted access. Failure
to protect the file can cause the key to be compromised which can allow the user to be
impersonated.
CAUTION: If the system is operating in Common Criteria mode, LDAP users must not use a public
key. For more information about Common Criteria, see the HP 3PAR InForm OS Common Criteria
Administrator’s Reference.
• The public key must be stored on the system using the setsshkey command to enable log
in without a password.
• The private key must be kept in a file accessible by scripts that use CLI commands.
The key pair is generated by using the ssh–keygen utility (typically included in an SSH client
software package and available on UNIX and Windows platforms).
NOTE: The following screen examples display output for UNIX systems. Windows screens are
identical, with DOS prompts replacing UNIX prompts.
The following steps describe setting up CLI scripting through SSH:
1. Create a CLI user and password using the createuser command.
$ssh user1@system1
3paradm’s password: ******
system1 cli% createuser –c testpw3 user3 all browse
User created
In the previous example, user user1 logs into system system1 and creates user user3 with
the password testpw3.
2. Create a key pair using the ssh–keygen utility. Both rsa and dsa key formats are supported
by the system and recommended key length is 2048 bits or greater.
NOTE: For additional information about the ssh–keygen utility and rsa and dsa key formats,
consult your SSH client documentation.
Using RSA keys is recommended. To create a key pair using rsa format:
$ ssh–keygen –b 2048 –t rsa
To create a key pair using dsa format:
$ ssh–keygen –b 2048 –t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/usr/user3/.ssh/id_dsa):
SSH 59