SSH Keychain for Xfce

25

14

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

Posted 2009-10-08T01:51:38.643

Reputation: 523

wfaulk'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 – 2009-10-09T11:42:14.173

Answers

5

Use ssh-agent and ssh-add?

wfaulk

Posted 2009-10-08T01:51:38.643

Reputation: 5 692

Right, must run ssh-add every time. Really annoying. – ablmf – 2011-10-04T21:57:53.597

Yes, Gnome automatically ssh-add's all private keys in ~/.ssh, but Xfce does not. – graywh – 2012-02-14T15:32:11.053

2ssh-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. – Alasdair – 2009-10-08T14:01:07.437

Gnome saves your private key password on disk somewhere? Ugh. Or maybe I don't know what you mean by "session". – wfaulk – 2009-10-08T15:41:18.903

By session I mean each time I log in.

Yes, gnome-keyring stores the passphrase on disk, but it is encrypted using the login password. – Alasdair – 2009-10-08T16:30:42.020

just add /usr/bin/ssh-add to your startup-items in xfce-settings – Produnis – 2014-04-05T20:45:22.913

42

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.

Dan

Posted 2009-10-08T01:51:38.643

Reputation: 839

6Instead of adding the export line to your bash, you can also enable 'Launch GNOME services on startup' in settings > Session and Startup – jeroen – 2015-01-10T23:33:21.900

@mreq I agree, this answer is more appropriate for what the OP was asking. – b10hazard – 2015-07-12T12:11:54.547

8This should be the accepted answer. – mreq – 2013-03-22T10:24:40.917

8

I think this is what you're looking for:

Setup of SSH agent in Xubuntu 11.10 to get password-less authentication with use of public key | Hnygard.no

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.

David Frascone

Posted 2009-10-08T01:51:38.643

Reputation: 116

This 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! – Marlies – 2014-07-15T10:01:03.840

thx, this works for me! – Produnis – 2014-04-05T20:44:30.010

No luck for me. Do you understand how ssh-add invokes ssh-askpass? That's not clear to me. – Air – 2014-05-24T15:14:57.790

3

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.

kolypto

Posted 2009-10-08T01:51:38.643

Reputation: 2 861

1

Just enable Gnome Services in the "Session and Startup" configuration.

Settings->Session and Startup->Advanced->Launch GNOME services on startup

bastian

Posted 2009-10-08T01:51:38.643

Reputation: 111