Article 51VET Running SSH-Agent on login

Running SSH-Agent on login

by
Sylvester Ink
from LinuxQuestions.org on (#51VET)
I'm trying to have ssh-agent run in the background when I log in. I don't need it to add any keys until I specify them during my session, but after that those keys should be usable until I log out. It's been suggested that the best way to maintain all this is to use the Keychain tool, but I'm still having issues with that.

If I use the command
Code:eval `keychain --eval --agents ssh id_rsa`directly from the command line in xterm, I can then use that key just fine, but only in that terminal. If I try to use it in another running instance of xterm, it won't work. If I try to use it in a fresh xterm instance, it won't work.

I guess I'm supposed to start ssh-agent either in my i3 config, or in my bash-profile/zprofile, but I haven't had luck with those either. What am I missing?

As a bonus question, I'd like to eventually change this to use gpg-agent to manage my keys, but for now, I'd just like to get ssh working.latest?d=yIl2AUoC8zA latest?i=2u3vBu1UcLs:zmsNDb2p5UM:F7zBnMy latest?i=2u3vBu1UcLs:zmsNDb2p5UM:V_sGLiP latest?d=qj6IDK7rITs latest?i=2u3vBu1UcLs:zmsNDb2p5UM:gIN9vFw2u3vBu1UcLs
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments