Results 1 to 7 of 7

Thread: Nautilus: how to configure a cipher for the sftp protocol?

  1. #1
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Nautilus: how to configure a cipher for the sftp protocol?

    How can one configure the cipher that is used by the sftp protocol from within the Nautilus file manager?

    I've got a hunch that Nautilus does not use the /etc/ssh/ssh_config file or uses SSH protocol version 1, because file transfers with scp (protocol version 2 with default as well as explicit configurations of the "aes-ctr" cipher) go much faster than the same transfer over sftp from within Nautilus.

    Judging from the actual speed, it looks like Nautilus uses the "des" cipher, which turns out to be the default cipher for ssh protocol version 1 and is insecure nowadays.

    Do you know how to configure the cipher to use by sftp from within the Nautilus file manager?
    To fail to prepare is to prepare to fail.

  2. #2
    Join Date
    Nov 2008
    Location
    Lleida, Spain
    Beans
    1,157
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Nautilus: how to configure a cipher for the sftp protocol?

    Quote Originally Posted by martinr View Post
    How can one configure the cipher that is used by the sftp protocol from within the Nautilus file manager?

    I've got a hunch that Nautilus does not use the /etc/ssh/ssh_config file or uses SSH protocol version 1, because file transfers with scp (protocol version 2 with default as well as explicit configurations of the "aes-ctr" cipher) go much faster than the same transfer over sftp from within Nautilus.

    Judging from the actual speed, it looks like Nautilus uses the "des" cipher, which turns out to be the default cipher for ssh protocol version 1 and is insecure nowadays.

    Do you know how to configure the cipher to use by sftp from within the Nautilus file manager?
    Nautilus uses ssh2
    Simply check /var/log/auth.log from your server and you will see it.

    This is my auth.log when tranfering files throught nautilus:

    Accepted password for user from XX.XX.XX.XX port 34776 ssh2
    Oct 1 15:35:01 Server133 sshd[10881]: pam_unix(sshd:session): session opened for user user by (uid=0)
    Oct 1 15:35:02 Server133 sshd[11144]: subsystem request for sftp
    Last edited by albandy; October 1st, 2012 at 02:47 PM.

  3. #3
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Nautilus: how to configure a cipher for the sftp protocol?

    Quote Originally Posted by albandy View Post
    Nautilus uses ssh2
    Simply check /var/log/auth.log from your server and you will see it.

    This is my auth.log when tranfering files throught nautilus:

    Accepted password for user from XX.XX.XX.XX port 34776 ssh2
    Oct 1 15:35:01 Server133 sshd[10881]: pam_unix(sshd:session): session opened for user user by (uid=0)
    Oct 1 15:35:02 Server133 sshd[11144]: subsystem request for sftp
    Thanks for you reply!
    You're right I do see ssh2 in my auth.log:

    Code:
    Oct  1 09:50:17 Server sshd[5236]: Accepted publickey for XXX from XXX.XXX.XXX.XXX port 42167 ssh2
    Oct  1 09:50:17 Server sshd[5236]: pam_unix(sshd:session): session opened for user XXX by (uid=0)
    Oct  1 09:50:41 Server sshd[5304]: subsystem request for sftp
    That leaves part two of my hypothesis. Why do I witness a 50% speed penalty between Nautilus sftp and scp when transferring the same big file to the same location?
    The only thing that I can explain it with is a difference in the used cipher.

    How can I find out what cipher sftp within Nautilus uses?
    Or how can I configure the cipher for Nautilus?
    To fail to prepare is to prepare to fail.

  4. #4
    Join Date
    Sep 2006
    Beans
    7,294
    Distro
    Lubuntu Development Release

    Re: Nautilus: how to configure a cipher for the sftp protocol?

    Quote Originally Posted by martinr View Post
    Or how can I configure the cipher for Nautilus?
    From what I can figure, Nautilus does use ~/.ssh/config So you should be able to set the cipher there using Ciphers.

  5. #5
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Nautilus: how to configure a cipher for the sftp protocol?

    Quote Originally Posted by Lars Noodén View Post
    From what I can figure, Nautilus does use ~/.ssh/config So you should be able to set the cipher there using Ciphers.
    Thanks for your reply, but nope, I'm sure scp does use that configuration but Nautilus' behaviour differs from that of scp. The speed difference is about 50% on my rig whilst transferring the same file to and from the same locations.

    The question remains, how can one configure the cipher to use by Nautilus, for the sftp protocol?
    Last edited by martinr; October 2nd, 2012 at 09:10 PM. Reason: typo
    To fail to prepare is to prepare to fail.

  6. #6
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Nautilus: how to configure a cipher for the sftp protocol?

    Now I've tested to transfer an identical big file with sftp from the command line as well as that same file with Nautilus (sftp) from and to the same locations.

    From the command line I observerd:
    Transfer speed: 1.8 MB/s
    and I was not asked for a password because I set up public keys on both hosts in ~/.ssh

    From Nautilus I got the following results:
    Transfer speed: 1.2 MB/s
    I was asked to enter a user name and password for the remote host.

    From this last observation I conclude that the ~/.ssh dir is not used by Nautilus and hence gets its configuration data from elsewhere.

    Who knows where Nautilus pulls its ciphers configuration data from?
    To fail to prepare is to prepare to fail.

  7. #7
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Nautilus: how to configure a cipher for the sftp protocol?

    I've come across two open bug reports that have been around since 2008 that notice the same speed impairments with sftp in Nautilus. They are:

    Ubuntu launchpad bug report: slow bulk sftp transfers

    Gnome bugzilla report: slow download using sftp://

    If you are affected by the same problem, please vote for the bug here.
    Last edited by martinr; October 4th, 2012 at 07:53 AM. Reason: Related bug reports
    To fail to prepare is to prepare to fail.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •