I am writing an appliation that will run a shell scripts behind the scene. The command that I run in the script looks like this,
cd ~/.ssh/ && ssh-add -D && ssh-add <id_rsa_filename>
It is trying to add a private key to the ssh agent.
When this command(s) finishes running, and if the ssh private key requires a passphrase, then you get this output from the ssh agent - "Enter passphrase:"
I would like to know,
- If it is possible to pass a passphrase as an argument while running the ssh-add,
example:
ssh-add -pass <my_pass_phrase>
- How can I change my script to interact with the ssh-agent to pass the passphrase when prompted.
Important: I do not wish to remove the passphrase tied to the ssh-private key