SSH_AUTH_SOCK in environment is invalid

Just had this error:

SSH_AUTH_SOCK in environment is invalid

when I rebooted and my .bashrc automatically loaded keychain.

The solution:

$  keychain -k all
# reload keychain

Written by Andrew Ittner in misc on Wed 04 June 2008. Tags: open source, linux