Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often use Places > Connect to server... and always connect with SSH.

The Connect to Server dialog box always selects Service type as Public FTP by default.

Is there a way to change this so Service type always defaults to SSH?

share|improve this question
Pavlos Gs answer should be helpful. But I think you could actually file this as a bug, since ssh is much more relevant than ftp. – Jo-Erlend Schinstad Aug 16 '11 at 15:13
up vote 3 down vote accepted

I don't see any relevant parameter, config file or gconf setting available in order to change the default options, so i guess you'll have to recompile the nautilus package.

You should download the source package first and probably edit /src/nautilus-connect-server-dialog.c.

More info on how to compile nautilus can be found on the following links:

share|improve this answer

Thanks Pavlos G. for the info and links. After reading the links and a few more Google searches I recompiled with the following:

sudo apt-get build-dep nautilus # get build dependencies 
apt-get source nautilus # get nautilus source
cd nautilus-
patch -p1 < ../sftp_default.patch # apply patch to set sftp (SSH) to default protocol
dpkg-buildpackage -rfakeroot -uc -b # build .deb files
cd ..
sudo dpkg -i *.deb # install .deb files

Where sftp_default.patch contains:

diff -ruN nautilus- nautilus-
--- nautilus-    2011-08-21 16:00:30.720119356 +1200
+++ nautilus-    2011-08-21 16:00:36.250910768 +1200
@@ -96,9 +96,9 @@
 /* Remember to fill in descriptions below */
 static struct MethodInfo methods[] = {
    /* FIXME: we need to alias ssh to sftp */
-   { "sftp",  SHOW_PORT | SHOW_USER },
    { "ftp",  SHOW_PORT | SHOW_USER },
+   { "ftp",  IS_ANONYMOUS | SHOW_PORT},
    { "dav",  SHOW_PORT | SHOW_USER },
    /* FIXME: hrm, shouldn't it work? */

To check to see if I could restore Nautilus to the default Ubuntu package, I used:

sudo apt-get install --reinstall nautilus

Works like charm, thanks again Pavlos G.

I found to be helpful with recompiling the package.

share|improve this answer
glad to hear that ;-) – Pavlos G. Aug 23 '11 at 3:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.