I want to use my vim config when editing files, but there are at least 5 different servers right now where I have to edit them. Of course I could use console (where I set up ssh-keys and and have a script so it wont asks for passhphrase), but then I have to maintain the vim config on every machine. so I decided to use gvim and browse/edit the remote machines via scp://, but on every action a popup appears asking for the passphrase.

this is a ubuntu 10.10 install, with xfce installed later on. i checked in the xfce settings so gnome services should start, but it still won't remember the passphrase.

  • when I try the same thing in gnome, it works.
    – Ashnur
    Commented Feb 7, 2011 at 15:15

3 Answers 3


You need an SSH agent for this to work. The SSH agent can store your private keys. You can then unlock a key once when you log in, and keep using that key without a password throughout the rest of your session.

There are two implementations that provide this functionality:

  • The standard ssh-agent distributed with OpenSSH
  • The gpg-agent distributed with GnuPG (if compiled with SSH support)

In order to use the standard ssh-agent, just make sure it's running and then add your private key to the current session using ssh-add.

  • After days of searching and reading stuff about ssh-agents I gave up and went back in gnome where it works allright. Now I found that you were responding to this. I tried to use both ssh-agents in xfce4 but could not get it work with gvim ( when I just tried in a terminal everything was ok). I am sure gvim needs something special, but not even starting the gnome session services in xfce solved this.
    – Ashnur
    Commented Mar 10, 2011 at 12:47

You have to provide the passphrase to the ssh agent, launch a terminal and type :

$ ssh-add

type your passphrase and it should work.


Not a direct answer to your question, but this is an alternative solution for your scenario.

You could use sshfs and map remote file trees this way. Then treat them as regular files which are part of your local root filesystem.

You must log in to answer this question.

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