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).
$ 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>
NOTE:
You can redirect the standard input, or stdin, to execute multiple CLI commands.
SSH
57