Re: how to invoke SSH-ADD to read passphrase from a file

From: Javed (kjaved_at_ncs.com.sg)
Date: 12/27/04


Date: 26 Dec 2004 23:09:57 -0800

Hi Richard,

Can you please suggest how should i go for it?
Our requirement is such that, we want to use public key based
authantication and that too it should contain the passpharase.
The problem that i am facing is to automate the whole process.
As i cant write a script where i can pass the password as one of the
parameter to SSH therefore i went through the process of using
SSH-AGENT and SSH-ADD, but there i got stuck again when SSH-ADD prompts
for the password. If possible can you suggest a way for SSH-ADD to read
the password from a file. May be we store the encrypted password in a
file and before invoking the SSH-ADD we decrypt the password and place
it into a new file which will serve as the actual input file for the
SSH-ADD (for password).

Please suggest.

Javed