Patrice.Gonthier at alcatel.fr
2004-Oct-19 12:22 UTC
launch ssh-add with a passphrase as parameter
Hello, I have the following problem. I have an application which is running and which has already request a passphrase to the user. This application needs to launch ssh agent and ssh add, but I do not want to be prompt again for the passphrase. My private key is of course encrypted with the passphrase. How can I do ? My only idea for the moment is to change the variable value of ask_passphrase and to redirect it to a program that I will write. This program will request to my running application the passphrase. Does anybody see a more simple way ? Thank you by advance Patrice
On Tue, Oct 19, 2004 at 02:22:30PM +0200, Patrice.Gonthier at alcatel.fr wrote:> Does anybody see a more simple way ?Perhaps making your other application use ssh-agent is easier than the other way around? I don't know.. //Peter
Patrice.Gonthier at alcatel.fr wrote:> Hello, > > I have the following problem. > I have an application which is running and which has already request a > passphrase to the user. > > This application needs to launch ssh agent and ssh add, but I do not want > to be prompt again for the passphrase. > My private key is of course encrypted with the passphrase. > > How can I do ?Abuse SSH_ASKPASS: cat > ~/.ssh/key-passphrase << EOF your passphrase goes here EOF chmod 0600 .ssh/key-passphrase cat > ~/.ssh/add-passphrase.sh << EOF #!/bin/sh cat ~/.ssh/key-passphrase << EOF EOF chmod 0700 ~/.ssh/add-passphrase.sh DISPLAY=junk SSH_ASKPASS=~/.ssh/add-passphrase.sh ssh-add </dev/null
Seemingly Similar Threads
- On Windows, launch ssh-add with a passphrase as parameter
- Is it mandatory to generate host keys on the target host, or can they be generated on another host and transfer to thetarget host
- How to get "Enter passphrase" on command line rather than GUI pop-up?
- Sending passphrase w/o keyboard interaction
- How to get "Enter passphrase" on command line rather than GUI pop-up?