SSH Keychain for Xfce
Solution 1
Use ssh-agent
and ssh-add
?
Solution 2
If you've installed Seahorse (sudo apt-get install seahorse
), add export $(gnome-keyring-daemon --daemonize --start)
to your .bashrc
and you'll get the same SSH key behaviour as in vanilla Ubuntu.
Solution 3
I think this is what you're looking for:
If you have not already done so, set up your private and public key (See Githubs description about SSH key half way through Set Up Git). It is important that you add a passphrase to your private key.
Install the package ssh-askpass:
sudo apt-get install ssh-askpass
Add «/usr/bin/ssh-add» to your start up. Go to Settings – Settings manager – Session and startup. Go to Application Autostart and add an item that runs the command «/usr/bin/ssh-add«:
On next login you’ll get the following dialog asking for your passphrase. After entering it, you can open a terminal or use sftp in the file manager without typing a password.
Solution 4
ssh
application examines $SSH_ASKPASS
environment variable (man ssh
) and executes that application in order to get passphrase. You should switch this app to another one, that's capable of remembering: e.g. the one GNOME uses originally.
Solution 5
I've also recently switched to xfce (i3 standalone to xfce+i3) and had the same issue.
In i3 I started /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
and put export $(gnome-keyring-daemon -s)
into .bashrc, but in xfce that only worked for bash terminals, not for other applications like virt-manager.
But it turns out there is a simple gui setting for that:
In "Session and Startup":
- in the tab "Application Autostart" enable "SSH Key Agent (GNOME Keyring: SSH Agent)" (And if you want the other 2 gnome keyring entries)
- in the tab "Advanced" under Compatibility enable "Launch GNOME services on startup"
Related videos on Youtube
Comments
-
Alasdair over 1 year
I have recently switched from Gnome to Xfce on Ubuntu 9.04.
In Gnome, the first time I entered the passphrase, it prompted me to save the passphrase.
In Xfce however, I am prompted for the passphrase every time I connect.
Is there a simple way to save the passphrase in Xfce?
-
Alasdair over 14 yearswfaulk's answer doesn't do what I originally asked for, but it's good enough so I've accepted it. With ssh-add, I only need to enter my passphrase once after I log in.
-
-
Alasdair over 14 yearsssh-add is a good suggestion. However I still have to run ssh-add and enter my passphrase once per session. That's much better than before, but not quite as convenient as when I was running Gnome.
-
wfaulk over 14 yearsGnome saves your private key password on disk somewhere? Ugh. Or maybe I don't know what you mean by "session".
-
andrey_derma over 12 yearsRight, must run ssh-add every time. Really annoying.
-
graywh over 12 yearsYes, Gnome automatically ssh-add's all private keys in ~/.ssh, but Xfce does not.
-
mreq about 11 yearsThis should be the accepted answer.
-
Produnis about 10 yearsthx, this works for me!
-
Produnis about 10 yearsjust add
/usr/bin/ssh-add
to your startup-items in xfce-settings -
Air almost 10 yearsNo luck for me. Do you understand how
ssh-add
invokesssh-askpass
? That's not clear to me. -
Karlin almost 10 yearsThis is by far the best method I've found for working with ssh keys on XFCE. Easier than using the terminal and a lot less bloated than installing the entire gnome keyring system. Thanks!
-
jeroen over 9 yearsInstead of adding the
export
line to your bash, you can also enable 'Launch GNOME services on startup' in settings > Session and Startup -
b10hazard almost 9 years@mreq I agree, this answer is more appropriate for what the OP was asking.
-
oldo over 2 yearsThanks! This should be the accepted answer. Nice and simple.