One method for caching your passphrase is to make use of the application
seahorse. This is the application that's used by all the distros that are based on GNOME2 & GNOME3. It might go by other names or shortcuts but you should be able to launch it on any of these distros from the command line like so:
Once you invoke it you'll be greeted with a GUI like so. Be sure the GUI is selected so that it shows everything "By keyring". It's helpful to keep things straight in this view.
Adding a key
Once you've brought up the GUI you'll want to click on the plus icon to add a key, and select "Secure Shell Key from the dialog.
Now you'll want to define what user this key will be used for and for what machine. This is just a description, but it's helpful when keeping track of your keys in the `$HOME/.ssh/authorized_keys file where it will get used later on. Also it's usually the last field in your
Setting the key's passphrase
Next you'll need to provide the passphrase for this key 2 times.
Copy .pub key to remote server
At this point the public/private key pair has been created, and has a passphrase. Now you'll need to copy the .pub key to a user's account on a remote server.
Authorize the copying of .pub
When you acknowledge the above dialog you'll need to authenticate as userX (tammy in this case) on the remote server (mulder).
Login to remote server (mulder)
With the key/pair copied to the remote server (mulder) as userX (tammy) we can now attempt to ssh to this server as this user. Doing this will trigger for the password to get added to the keyring permanently.
Adding passphrase permanently
You'll then get prompted for the passphrase, with the option to make it permanently part of the keyring store forever.
NOTE: This is critical, doing this will allow you to never have to provide this passphrase ever again. Any time you login to your account and unlock it, you'll be unlocking this keyring, which contains this passphrase.
No more passphrase
From now on any time you log in you'll no longer have to provide your passphrase.
Besides logging in and out to the remote server (mulder) if you close
seahorse and reopen it you'll notice an additional "Unlock passphrase" entry now exists in your Login keyring. This was added when you checked the box in the previous dialog.
NOTE: I believe you can also add entries manually to store passphrases within your Login keyring too. This would allow for you to store any preexisting SSH key pair passphrases as well.
For this to work I'm using
gnome-keyring-pam which facilitate this. An entry such as this in my PAM configuration allows for the Login keyring within
seahorse to be unlocked when I login and/or unlock my screenlock.
$ more /etc/pam.d/passwd
auth include system-auth
account include system-auth
password substack system-auth
-password optional pam_gnome_keyring.so use_authtok
password substack postlogin
Notice the 5th line.