This package http://www.kde-apps.org/content/show.php/kssh-add?content=76675
Does the whole thing very seamlessly. Sorry Matt, I couldn't make your scripts work, but this more or less does the same.
Personally, I don't always want to run ssh-add at startup, so I use
alias ssh='if [[ ! `ssh-add -l| grep .ssh | wc -l` > 0 ]]; then ssh-add < /dev/null; fi; ssh'
in my .bashrc so that I run ssh-add if it doesn't already have the passphrase.
This package www.kde- apps.org/ content/ show.php/ kssh-add? content= 76675
http://
Does the whole thing very seamlessly. Sorry Matt, I couldn't make your scripts work, but this more or less does the same.
Personally, I don't always want to run ssh-add at startup, so I use
alias ssh='if [[ ! `ssh-add -l| grep .ssh | wc -l` > 0 ]]; then ssh-add < /dev/null; fi; ssh'
in my .bashrc so that I run ssh-add if it doesn't already have the passphrase.