i log in to system with ssh agent forwarding turned on. now i have 'ssh-add -l' working with keys from remote machine (from where i logged in). now there could be option to keychain to create login script based on active enviroinment (keychain --export-keys perhaps), so after creating new terminals these use that forwarded keys, not starting new ssh-agent instance it's just perhaps such line to keychain code: $ env | grep SSH_AUTH_SOCK | xargs -r echo export > ~/.keychain/`hostname -s`-sh Reproducible: Always Steps to Reproduce: 1. 2. 3.
keychain 2.5.0 now has full inheritance support. For what you're asking, you should use "keychain --inherit any". If you only want it to happen if there's not already a working keychain agent, then use "keychain --inherit any-once"