Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I change it to save my identity permanently using Xfce? During my login session after I have entered:

$ ssh-add

Then identity is saved and I can connect via ssh without getting the dreaded:

Enter passphrase for key

However, once I logout and login back-in I get the following when running:

$ ssh-add -L

The agent has no identities.

$ ssh <hostname>

Enter passphrase for key '/home/user/.ssh/id_rsa':

Stackoverflow has the following solution, yet I do not understand the reference to in the config file:

IdentityFile ~/.ssh/id_rsa_buhlServer

Specifically I do not understand what I would put on the identity file. Would I put the above word for word?

Or just add my file:

IdentityFile ~/.ssh/id_rsa

StackOverflow solution

share|improve this question
ssh is completely independent of your window manager. Are you using the same login for Xfce and Unity? – terdon Jun 24 '13 at 18:50
I have a brand new clean install of Xfce and ubuntu. I wiped out the old unity install. I have a Ubuntu server and do not have this problem and neither on my other Ubuntu clients. Something must be different. – Alliswell Jun 24 '13 at 18:59
I took Xfce out of the question and just focused on Ubuntu. – Alliswell Jun 24 '13 at 19:12
I'm thinking that Xfce/Gnome may actually make a difference. Which desktop environment are you having issues with? – andyg0808 Jun 24 '13 at 23:44
Also, note that Xfce and Gnome are not just window managers, they're actually desktop environments, according to… – andyg0808 Jun 24 '13 at 23:57
up vote 2 down vote accepted

It appears that Xfce may well be the cause of your problem. Gnome, which underlies Unity, provides the GnomeKeyring, which can automatically unlock SSH keys for you—it replaces ssh-agent, as far as I can tell, and it supports ssh-add. You can interact with it using Seahorse. In your Unity install, press Alt+F2 and type seahorse, then press Enter to run Seahorse. Then look for a key labelled "Unlock password for: " and your key name. If you find one, that's probably what is causing the automatic unlock on Unity/Gnome. In that case, to get the same effect on XFCE, you might try these instructions from ArchLinux on using Gnome Keyring without Gnome. (I have no idea if they actually work; I just found them and I've found Arch's explanations helpful in the past.)

Further Reading:

share|improve this answer
Your guidance put me on the right track. Once I understood that it needed the GnomeKeyring I found that all was needed in Ubuntu-XFce was to goto Settings-Session and Startup-Advanced and select Launch GNOME services on startup and it saved the identity to the keyring. – Alliswell Jun 25 '13 at 17:46
I could have also installed the key manager for Open SSH link as this article seems to point out. I have since then installed it on my Ubuntu Server and the key stays even when I logout. – Alliswell Jun 27 '13 at 17:08
Thanks for the pointer to keychain (the key manager for OpenSSH) in your comment above. I'd never seen that before, but it looks handy. I figured I'd provide a link to the source here (which includes the docs in the readme) in case others are interested: – andyg0808 Jul 26 '14 at 19:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .