GNOME Bugzilla – Bug 688308
sftp server connection in the location bar ignores the ssh config file
Last modified: 2016-04-15 18:49:54 UTC
I defined some shortcuts in ~/.ssh/config like Host ShortcutName HostName servername User username These shortcuts work when I ssh to a server in the terminal (or mount the same server with sshfs) but are ignored by nautilus. When I use in the location bar a string like sftp://ShortcutName I'm asked for the username and password for the server "ShortcutName" and if I type them in the connection fails (obviously). Looks like this used to work in the past and would come in handy. I'm on Ubuntu 12.10.
-> gvfs This is probably a gvfs bug.
I have the same problem on Ubuntu 12.04. Seem the same bug fixed in past and now reappared reported here: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/264803 https://bugzilla.gnome.org/show_bug.cgi?id=550929 Someone can solve please?
Anyone on this?
I've have the same problem with Fedora release 17 and I have this packages gvfs-1.12.3-1.fc17.i686
*** Bug 764827 has been marked as a duplicate of this bug. ***
I tried this... (In reply to Antonio from comment #0) > I defined some shortcuts in ~/.ssh/config like > > Host ShortcutName > HostName servername > User username > > These shortcuts work when I ssh to a server in the terminal (or mount the > same server with sshfs) but are ignored by nautilus. When I use in the > location bar a string like The shortcuts are not ignored by GVfs (Nautilus). "ShortcutName" is used in GIO URI, but GVfs tries to mount to "servername" in the background... we should probably show the original servername at least in the password prompt. > I'm asked for the username and password for the server "ShortcutName" and if > I type them in the connection fails (obviously). It works correctly for me. Only problem is that you have to specify username even if it is already specified in the config file. So it is probably another bug if it fails for you. Did you really use the same username as you have in the config file? The problem is that ssh uses login name by default if username is not specified and the backend doesn't know that the username is already specified in the config file. So GVfs has to ask for username in such case... You can do following if you don't want to specify the username everytime: - You can bookmark the location in the Nautilus (including the username). - You can set up key-based authentication and you don't have to specify neither the password...
Created attachment 325773 [details] [review] sftp: Show original hostname in the password prompt Server shortcuts may be configured in ~/.ssh/config. Shortcut name may be used in the URI consequently, however underlying SSH daemon connects to the original hostname, which might be confusing and potential security issue. Show the original hostname in the password prompt from the mentioned reasons.
It works for me too. I never tried to properly put the user name in the field that pops up. I agree putting the hostname in the password prompt would help a lot to understand what exactly is going on here. Also I could not find any information about this behavior, which now should be easier to figure out, as it is mentioned here. I mainly needed the ./.ssh/config to define some login options, which I can do now. I agree the username can be stored in a bookmark, so having to repeat it is not such a big issue. If there is no simple way to cache the user name directly from the /.ssh/config, I would assume we can consider this bug as solved. Sorry for opening a new bug, I was not sure what the best behavior is for a bug that is open since quite some time.
(In reply to cosama from comment #8) > It works for me too. I never tried to properly put the user name in the > field that pops up. Ok, thanks for feedback. > I agree putting the hostname in the password prompt would help a lot to > understand what exactly is going on here. Also I could not find any > information about this behavior, which now should be easier to figure out, > as it is mentioned here. > > I mainly needed the ./.ssh/config to define some login options, which I can > do now. I agree the username can be stored in a bookmark, so having to > repeat it is not such a big issue. I also forget that you can use keyring to store the credentials if you choose "Remember forever" in Nautilus. > If there is no simple way to cache the user name directly from the > /.ssh/config, I would assume we can consider this bug as solved. I will close the bug later - after I will push the patch, which I do not plan to push to stable branch now, so I will wait till GVfs will be branched... > Sorry for opening a new bug, I was not sure what the best behavior is for a > bug that is open since quite some time. Opening a new bug is not a definitely good idea, it is better to add a comment with some additional info in the already existing bug...
Comment on attachment 325773 [details] [review] sftp: Show original hostname in the password prompt commit 00ed5c6320d9cab35e5a4c12f3e35ec10dc3fb62