The "Use SSH tunnel" option doesn't work

Bug #764632 reported by Thomas Horsten
120
This bug affects 25 people
Affects Status Importance Assigned to Milestone
Vinagre: VNC client for GNOME
Confirmed
Medium
vinagre (Ubuntu)
Fix Released
Medium
Unassigned
Oneiric
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: vinagre

TESTCASE:
* try to connect to an host using the "use ssh tunnel" option

Before the update it displays this message:
Error creating the SSH tunnel
Error reading from Unix: Input/output error

With the upgrade it should work

EXTRA COMMENTS:
I've had this problem in the past but it usually worked if I simply retried the connection. Now it happens every time and it won't establish the ssh tunnel.

If I connect to the tunnel host with ssh from the command line that works fine, also if I create the tunnel with:

$ ssh -L5999:h1:5901 <email address hidden>

it also works fine when I then connect to localhost:5999 in vinagre.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: vinagre 2.30.3-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Mon Apr 18 14:33:11 2011
ExecutablePath: /usr/bin/vinagre
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427.1)
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: vinagre
UpgradeStatus: Upgraded to natty on 2011-04-18 (0 days ago)

Revision history for this message
Thomas Horsten (thomas-horsten) wrote :
Revision history for this message
Davide (dspinell) wrote :

same problem for me: ubuntu 11.04 beta 2

Revision history for this message
Davide (dspinell) wrote :

after fresh install of ubuntu 11.04 (bith 32 and 64 bit) I experience the same problem. ssh tunneling does not work with unison either, whereas ssh works from terminal

Revision history for this message
James (jboggs2000) wrote :

I, too, have this issue. I stumbled across a similar bug in a previous release ( https://bugs.launchpad.net/ubuntu/+source/vinagre/+bug/516847 ) that had been resolved. I'm running the release version of 11.04, with Vinagre 2.30.3. After running the command recommended in the previous bug ( nm /usr/bin/vinagre | grep vinagre_ssh_connect ) I get the same "no symbols" message. Dunno if this even applies in the current version, but it's there if it helps any.

Revision history for this message
YvesDelannoy (yves-delannoy) wrote :

A workaround for me was to create manually the ssh tunnel from a terminal : assuming tou can issue a simple ssh to your router with

  ssh <LoginName>@<PublicNameOfRouter>

the tunnel is started with

  ssh -L 9999:<VpnserverAsSeenFromRouter>:5901 <LoginName>@<PublicNameOfRouter>

assuming you've started the vpnserver on screen :1 (for screen :2 use 5902 in place of 5901 and so on)

The tricky thing is then to ask vinagre to connect to localhost:9999 (yes, localhost, not your remote router)... and it works!

NB the ssh tunnel is stopped by disconnecting from the ssh that started it.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

The issue was filed upstream at https://bugzilla.gnome.org/show_bug.cgi?id=644432 ; linking the report.

Changed in vinagre (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in vinagre:
importance: Unknown → Medium
status: Unknown → New
Changed in vinagre (Ubuntu):
importance: Low → Medium
Revision history for this message
s4nt (s4nt) wrote :

I too can confirm this issue.
I'm running a fresh install of Xubuntu 11.04, vinagre version 2.30.3-1ubuntu2

When trying to connect using the ssh tunnel option I get the "Error reading from unix: Input/output error" message.

SSH tunneling worked fine before, on Ubuntu 10.10, on the same laptop.

Changed in vinagre:
status: New → Confirmed
Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

I've tracked down the problem. A patch is attached for the Oneiric package. The issue is that ssh enumerates and closes its file descriptors before opening /dev/tty, so the PTY slave is temporarily closed and thus an EIO is delivered to the PTY master in read(). The solution is to keep the slave open in the vinagre process until ssh has opened the terminal. I have also sent the patch to upstream.

(Note that this only addresses the regression where ssh tunneling started failing every time. There is a pre-existing race issue where ssh sometimes receives a SIGHUP after the user enters their password, but it is unrelated and this patch does not address it.)

tags: added: patch patch-forwarded-upstream
removed: ayatana-scrollbar i386 natty
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your work Tristan

Changed in vinagre (Ubuntu Oneiric):
status: New → Triaged
importance: Undecided → Medium
description: updated
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Ok, I've updated to the current stable version (3.2.1) and include your patch (I've taken the upstream git commit to have the context and description in the patch with the commit number)

Changed in vinagre (Ubuntu Oneiric):
status: Triaged → Fix Committed
Changed in vinagre (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello TH, or anyone else affected,

Accepted vinagre into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

3.2.1-0ubuntu1 works over here.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vinagre - 3.2.1-0ubuntu1

---------------
vinagre (3.2.1-0ubuntu1) oneiric-proposed; urgency=low

  * New upstream version
  * 03_fix_ssh_tunneling_eio_when_slave_temporarily_closed.patch:
    - updated the patch with the git commit (same code but with context)

  [ Tristan Schmelcher ]
  * Fix EIO in read() on ssh tunneling PTY master due to the slave being
    temporarily closed by ssh. (lp: #764632)
 -- Sebastien Bacher <email address hidden> Thu, 20 Oct 2011 10:58:15 +0200

Changed in vinagre (Ubuntu):
status: Fix Committed → Fix Released
Changed in vinagre (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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