After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 550929 - nautilus sftp:// doesn't read User in ~/.ssh/config
nautilus sftp:// doesn't read User in ~/.ssh/config
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: sftp backend
git master
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2008-09-05 00:27 UTC by Pablo Castellano (IRC: pablog)
Modified: 2009-03-02 12:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Proposed patch (1.27 KB, patch)
2008-09-05 09:49 UTC, Christian Neumair
reviewed Details | Review

Description Pablo Castellano (IRC: pablog) 2008-09-05 00:27:23 UTC
Please describe the problem:
Hi!

I use a lot the sftp://something function in nautilus. Apparently nautilus reads the file ~/.ssh/config which is good. But in my case I'm using a ssh key pair to connect to my desktop computers from my laptop. Nautilus doesn't read all parameters, more concretely nautilus seems to ignore the parameter "User".

Let's give an example ~/.ssh/config:
Host desktop
User murdok
HostName 192.168.7.28
--eof--

If I type sftp://murdok@desktop it works perfectly. Instead, if I type sftp://desktop (as if I did $ sftp desktop in a console), a popup windows asks me for the user/password.

It's not the expected behaviour and it's becoming a bit annoying for me.
Thanks to the developers! If more information is need or I didn't explain it well, just ask me.


Steps to reproduce:
1. Do all the steps to create a ssh connection with key pairs
2. Edit ~/.ssh/config to use a default User with a Host
3. In the nautilus bar, type sftp://yourhost


Actual results:
Nautilus asks you for the user and password

Expected results:
Connect without asking because authentication is with ssh key pair.

Does this happen every time?
Yes

Other information:
I have not found the piece of code exactly where is happens, maybe the bug is in another library that nautilus uses. Anyways I think the bug is in nautilus that ignores de "User foo" line
Comment 1 Pablo Castellano (IRC: pablog) 2008-09-05 00:27:42 UTC
From: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/264803
Comment 2 Christian Neumair 2008-09-05 09:47:05 UTC
Good catch. Confirming, reassigning to GVFS.
Comment 3 Christian Neumair 2008-09-05 09:49:24 UTC
Created attachment 118090 [details] [review]
Proposed patch
Comment 4 Pablo Castellano (IRC: pablog) 2008-09-05 13:26:26 UTC
I'm pleased that you understood the problem :P but I'm also really impressed by the quick response and patch!! :D
Comment 5 Pablo Castellano (IRC: pablog) 2008-10-16 13:15:24 UTC
Hello!
Could any developer please apply the patch to the trunk?
Thanks.
Comment 6 Matthias Clasen 2009-01-10 03:57:18 UTC
Patch looks good to me. 
Alex, can we get this committed ?
Comment 7 Alexander Larsson 2009-03-02 12:17:06 UTC
Looks good. commited.