Wednesday, October 9, 2013

In Ssh Need To Pass Passphrase Automatically From A Terminal And/or Cron

WWW.UNIXBABUFORUM.INThis is my first attempt at ssh (OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009) and sftp on AIX 5300-07-07-0846. I need a method of using SSH_ASKPASS from a terminal (tty) and cron to automatically supply the passphrase. The vendor requires a passphrase. I am using keychain in the .profile which starts ssh-agent when necessary. 

Below is the code from .profile: 
/usr/bin/keychain --nocolor ~/.ssh/id_rsa ~/.ssh/id_dsa 
. ~/.keychain/gomaix-sh 

If I manually enter the passphrase the first time through the .profile, ssh and sftp work. A second attempt through the .profile does not ask for the passphrase because keychain (KeyChain 2.6.8)/ssh-agent already have the passphrase stored. 

Our system reboots every night which kills the ssh-agent and loses the passphrase. I ultimately need to automatically supply the passphrase to the ssh-agent when booting the system. 
WWW.UNIXBABUFORUM.IN I installed expect and experimenting with it. I see where it is defeating the security issue, this will have to be discussed with the higher ups. 

0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM