3PAR InForm® OS 2.2.4 CLI Administrator's Manual (320-200113 Rev A, March 2009)

3.26
SSH
3PAR InForm OS CLI Administrator’s Manual InForm OS Version 2.2.4
4 Issue the setsshkey command.
5 Write your script. See the following example:
6 If you specified a pass phrase when creating the key pair, run
ssh-agent and ssh-add to
decrypt the key before running your script (
<script_name> in the following example).
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!
#!/bin/sh
# Assume that the user name “user3” exists on system1
# The private key file “id_rsa” is accessible.
SSH="ssh –i id_rsa –l user3 system1 "
#
# Execute the command passed in as command line argument $1
${SSH} $1
$ ssh–agent
echo Agent pid 24216
$ ssh–add
Enter passphrase for /home/usr/user3/.ssh/id_dsa: ******
Identity added: /home/usr/user3/.ssh/id_dsa (/home/usr/user3/.ssh/id_dsa)
$ <script_name>