Access to remote SSH server does not distinguish the connection by port

Bug #59882 reported by hossi
4
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Undecided
Unassigned
nautilus (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

When accessing an SSH server, the connection is not identified by the used port. If there is a configuration, where port forwarding is used to forward traffic to multiple SSH servers, only one of the servers can be accessed.

For example, let there be two SSH servers
192.168.1.10:22
192.168.1.20:22
behind a gateway with public address
192.168.2.1
and with port forwarding configuration
192.168.2.1:2201 -> 192.168.1.10:22
192.168.2.1:2202 -> 192.168.1.20:22

Now create two connections with nautilus to the SSH servers:

Service type: SSH
Server: 192.168.2.1
Port: 2201
Folder: /home/user
User name: user
Name to use for connection: Conn1

Service type: SSH
Server: 192.168.2.1
Port: 2202
Folder: /home/user
User name: user
Name to use for connection: Conn2

Connect to "Conn1". You will see the directory listing of "user" in server 192.168.1.10. Close the window and connect to "Conn2". You will still see the same directory listing. Expecting to see directory listing of "user" in server 192.168.1.20 instead.

Even tried to enter the port information to the "Server" field, like this:
Server: 192.168.2.1:2201
Server: 192.168.2.1:2202
with no change in behaviour.

I am using Nautilus 2.14.1 in Ubuntu 6.06 LTS.

Revision history for this message
Michael Chesterton (chesty) wrote :

Hello,

I tried testing that here, and I also had problems. I think the problem is with remote host identification.

ie, if you try to connect to the servers using ssh from the command line, like ssh -p 2201 192.168.2.1 and ssh -p 2202 192.168.2.1, one command will work, the other will fail with an error message like "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"

One solution would be to add two ip addresses to the gateway, 192.168.2.10 and 192.168.2.20 one for each remote ssh server, and use DNAT.

192.168.2.10 -> 192.168.1.10
192.168.2.20 -> 192.168.1.20

Revision history for this message
hossi (hossi) wrote :

Hi,

Yes, you are true. There are ways to work around this by changing the network configuration. The problem with nautilus is that it seems not to identify an SSH connection by an address/port tuple. Even if the host identification has changed, it should not connect to a completely different port.

Please note that the command line client still gives you a choice to log in with a private key. Using one, I simply get the following notification:

"
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Enter passphrase for key 'XXXXXX':
"

So I think using a private key, I should simply receive a notification from nautilus and then be able to connect.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. That looks really a corner case, we don't have enough people working on bugs to spend time on that for the moment and it should probably be forwarded upstream, opening an upstream task

Changed in nautilus:
assignee: nobody → desktop-bugs
importance: Undecided → Low
Revision history for this message
Dr D J Clark (djc-online) wrote :

I am using 6.10 Nautilus version 2.16.1

I have several servers behind a firewall to which I connect with SSH with private keys. ie. ssh://<email address hidden>:2201, ssh://<email address hidden>:2201 etc.
This works ok for command line ssh/scp/sftp
Using the Places:Connect to server menu I can create menu items in Places:Network places:Server 1, Places:Network places:Server 2 etc. But Nautilus does not distinguish by port so all the connections display the files on the first connection used. Rebooting the system resets this so another connection can be used.
On version 6.06 the problem could be worked round as after a reboot each connection would work correctly, but I now find that with 6.10 even after a reboot the first selected connection in a session is the only one that connects.

Revision history for this message
Dr D J Clark (djc-online) wrote :

On one machine which has been upgraded from 6.06 through to 7.10 the multiport connection was working ok until a few weeks ago when I suddenly found I was getting through to the same server whichever port connection was used. So that suggests to me that there has been some change in the configuration file: until the most recent update (around Nov/Dec 2007) the list of connections carried over from previous versions was working even with the current version of nautilus.

Note the problem is NOT with remote host identification; I use the same host keys on the servers, so connecting on the command line with private keys there is no problem.

Revision history for this message
Sebastien Bacher (seb128) wrote :

could anybody try if that's still an issue in hardy? nautilus is using gvfs not and the bug might be fixed there

Changed in nautilus:
status: New → Incomplete
status: New → Incomplete
Revision history for this message
Sebastien Wains (sebastienw-deactivatedaccount) wrote : Re: [Bug 59882] Re: Access to remote SSH server does not distinguish the connection by port

Hi,

I just checked and apparently it is fixed for me.

On Tue, Jun 24, 2008 at 23:53, Sebastien Bacher <email address hidden> wrote:
> could anybody try if that's still an issue in hardy? nautilus is using
> gvfs not and the bug might be fixed there
>
> ** Changed in: nautilus (Ubuntu)
> Status: New => Incomplete
>
> ** Changed in: nautilus
> Status: New => Incomplete
>
> --
> Access to remote SSH server does not distinguish the connection by port
> https://bugs.launchpad.net/bugs/59882
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for the update, closing the bug

Changed in nautilus:
status: Incomplete → Fix Released
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.