Ask Your Question

ssh-agent not running by default in Xfce

asked 2018-01-25 23:54:14 -0500

psg_nm gravatar image

I recently installed Xfce using the dnf groupinstall "Xfce Desktop" on a stock Fedora 27 machine (i.e., I am not using the Xfce Spin). When trying to ssh from the machine to other machines, I noticed that ssh-agent must not have been running as a part of the startup of Xfce because I had to repeatedly put in my ssh passphrase. When using Gnome 3 or Plasma on the same system, I only have to enter my ssh passphrase once per session.

Is there some setting I need to modify or add to enable ssh-agent on Xfce session startup? Any guess why this doesn't work when installed with "dnf" already? Seems like a bug.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-01-26 12:59:29 -0500

psg_nm gravatar image

As noted above by villykruse, you can use the GNOME (or KDE) services to handle this.

If you don't want to run the GNOME or KDE services at startup under Xfce, you can simply run ssh-add in a terminal to add your private key identity to the authentication agent (ssh-agent).

I had jumped to conclusions that ssh-agent wasn't running when I kept getting prompted for my SSH passphrase. As noted in my comment above, I ran ps aux | grep ssh-agent and confirmed that Xfce was actually starting up ssh-agent for me (sorry for the confusion).

At that point, I realized that I had been so spoiled with GNOME and KDE, which automatically ask you for your SSH passphrase during a desktop session the first time you try to use ssh. After you provide the SSH passphrase to GNOME or KDE, that private key identity is registered with the equivalent ssh-agent for the session.

For the stock Xfce installation (using dnf as described in the question above), which doesn't automatically run the GNOME or KDE services, you need to run ssh-add manually--something I haven't had to do for a while--or you can configure Xfce to run the GNOME or KDE services at startup (as villykruse explains).

edit flag offensive delete link more

answered 2018-01-26 01:53:18 -0500

villykruse gravatar image

ssh-agent may be running, and if it does you still have to unlock the keys.

If you use gnome-keyring instead, the unlocking of the keys can occur and log-in time, as long as you log in with a password which can unlock the keys.

Install gnome-keyring.i686 and gnome-keyring-pam.i686

Run xfce4-session-settings

Select Advanced

Check Launch GNOME services on startup

Log out and log in again.

edit flag offensive delete link more


Thanks for the response. I sounds like a good solution.

What I realize now is that ssh-agent is actually running (I checked with ps aux | grep ssh-agent--I jumped to conclusions earlier) and I have been spoiled by GNOME and KDE, which do the ssh-add function for you by automatically prompting you for the passphrase when you first try using ssh.

Since ssh-agent is running, I remembered that I can manually use ssh-add in a terminal to add my private key identity to the the authentication agent (ssh-agent) for the session--it has been a while since I've needed to do that.

psg_nm gravatar imagepsg_nm ( 2018-01-26 12:21:28 -0500 )edit

Question Tools

1 follower


Asked: 2018-01-25 23:54:14 -0500

Seen: 2,123 times

Last updated: Jan 26 '18