27

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
  • 553

6 Answers6

48

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
  • 969
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.

6

Use ssh-agent and ssh-add?

wfaulk
  • 6,307
4

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":

  1. in the tab "Application Autostart" enable "SSH Key Agent (GNOME Keyring: SSH Agent)" (And if you want the other 2 gnome keyring entries)
  2. in the tab "Advanced" under Compatibility enable "Launch GNOME services on startup"

xfce -> Session and Startup -> Application Autostart

xfce -> Session and Startup -> Advanced

Zauberfisch
  • 161
  • 6
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
  • 3,121
2

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

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

bastian
  • 121