I have a screen session open in an lxterminal window. If I SSH somewhere, the first time it happens, an ssh-agent window opens and asks me for my private key passphrase, and after that ssh goes right on. If I log in from outside to this machine and attach to the screen session however, ssh-agent now asks me every time I connect for my passphrase, in the terminal. Is there a way to avoid this and to let it continue using the X agent, or at least to have the non-X agent remember the passphrase?
1 Answer
On my server ssh (out) I use Funtoo Keychain I use the funtoo keychain on my Ubuntu server. I only have to save the passphrase once per system boot.
Here is information from their site: The Funtoo "Keychain helps you to manage ssh and GPG keys in a convenient and secure manner. It acts as a frontend to ssh-agent and ssh-add, but allows you to easily have one long running ssh-agent process per system, rather than the norm of one ssh-agent per login session." Here are install instructions for Ubuntu-Debian Linux Server keychain
On my Ubuntu client using Xfce I am using Gnome Services. In order to save it I use the Ghome keyring.
-
Thanks! I voted it up because it is an interesting solution, but I somehow don't like having the key work even after complete logout from the server, so I'll be looking for another solution meanwhile.– ShwouchkJul 3, 2013 at 11:17
-
@Shwouchk good thought. Now I am worried. I am going to have to look into that one. Jul 3, 2013 at 15:51
-
Do you know if there is a way to make it remember even through a reboot? See my question; OS X for instance can do this. Jul 19, 2013 at 18:56
-
What's the point? You might as well just keep a non-passworded file then (and encrypt the entire / or /home/user dir, to be decrypted at boot/login)– ShwouchkAug 25, 2013 at 12:27
-
I'm not a fan of bloating machines installing packages for everything, so I was a bit hesitant about giving keychain a go, but I have to admit I'm happy I made an exception here: keychain does a pretty damn good job at what it does, and it's super easy to set up.– MahnOct 26, 2013 at 19:57
SSH_AUTH_SOCK
to the screen session