Bug 730346 - Unable to connect to a display using ssh tunnelling
Summary: Unable to connect to a display using ssh tunnelling
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-12 14:42 UTC by Daniel Berrangé
Modified: 2011-12-06 15:07 UTC (History)
6 users (show)

Fixed In Version: virt-viewer-0.4.1-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 15:07:13 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1614 normal SHIPPED_LIVE virt-viewer bug fix and enhancement update 2011-12-06 00:51:05 UTC

Description Daniel Berrangé 2011-08-12 14:42:49 UTC
Description of problem:
Virt-viewer fails to connect to remote displays using ssh tunneling

Version-Release number of selected component (if applicable):
virt-viewer-0.4.1-1.el6

How reproducible:
Always

Steps to Reproduce:
1.$ virt-viewer -c qemu+ssh://root@lettuce/system rhel6x86_64

2.
3.
  
Actual results:
Bad port '0' message and it exits


Expected results:
virt-viewer displays remote guest

Additional info:

Comment 3 Daniel Berrangé 2011-08-14 20:58:23 UTC
There was another issue, which hit if SSH is running on a non-standard port

eg, If SSH is on port 9000

  virt-viewer -c qemu+ssh://root@lettuce:9000/system rhel6x86_64

Should result in two ssh connections being opened

  ssh -p 9000 -l root lettuce nc -U /var/run/libvirt/libvirt-sock-ro
  ssh -p 9000 -l root lettuce nc localhost 5900

But we missed out the '-p 9000' part of the second connection. This is also fixed in this BZ

Comment 4 zhe peng 2011-08-15 05:25:32 UTC
this bug can reproduce with virt-viewer-0.4.1-1.el6

verify with virt-viewer-0.4.1-3.el6:

step:

   for vnc:

  default port:22
   #virt-viewer -c qemu+ssh://root@10.66.4.218/system test-yp --debug
output:
    .....
** (virt-viewer:1831): DEBUG: Guest (null) has a vnc display

** (virt-viewer:1831): DEBUG: Guest graphics address is localhost:5900
** (virt-viewer:1831): DEBUG: Set connect info: 10.66.4.218,localhost,5900,ssh,(null),root,0
** (virt-viewer:1831): DEBUG: Opening indirect TCP connection to display at localhost:5900

** (virt-viewer:1831): DEBUG: Setting up SSH tunnel via root@10.66.4.218
    .....
  the guest can open w/o error.

  change ssh port to 9000
   #virt--viewer -c qemu+ssh://root@10.66.6.166:9000/system XXdemo --debug

    .....
** (virt-viewer:4118): DEBUG: Guest (null) has a vnc display

** (virt-viewer:4118): DEBUG: Guest graphics address is 0.0.0.0:5901
** (virt-viewer:4118): DEBUG: Set connect info: 10.66.6.166,0.0.0.0,5901,ssh,(null),root,9000
** (virt-viewer:4118): DEBUG: Opening indirect TCP connection to display at 0.0.0.0:5901

** (virt-viewer:4118): DEBUG: Setting up SSH tunnel via root@10.66.6.166:9000
   .....
  the guest can open w/o error.
 
test with spice:
   default port:22
  #virt-viewer -c qemu+ssh://root@10.66.6.166/system winxp --debug

  .....
** (virt-viewer:5735): DEBUG: Guest (null) has a spice display

** (virt-viewer:5735): DEBUG: Guest graphics address is 0.0.0.0:5900
** (virt-viewer:5735): DEBUG: Set connect info: 10.66.6.166,0.0.0.0,5900,ssh,(null),root,0
** (virt-viewer:5735): DEBUG: Opening indirect TCP connection to display at 0.0.0.0:5900

** (virt-viewer:5735): DEBUG: Setting up SSH tunnel via root@10.66.6.166
  .....
 the guest can open w/o error.

   ssh port:9000
   #virt-viewer -c qemu+ssh://root@10.66.6.166:9000/system winxp --debug
   
  .....
** (virt-viewer:4152): DEBUG: Guest (null) has a spice display

** (virt-viewer:4152): DEBUG: Guest graphics address is 0.0.0.0:5900
** (virt-viewer:4152): DEBUG: Set connect info: 10.66.6.166,0.0.0.0,5900,ssh,(null),root,9000
** (virt-viewer:4152): DEBUG: Opening indirect TCP connection to display at 0.0.0.0:5900

** (virt-viewer:4152): DEBUG: Setting up SSH tunnel via root@10.66.6.166:9000
  .....
 the guest can open w/o error.
Verification passed.

Comment 5 errata-xmlrpc 2011-12-06 15:07:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2011-1614.html


Note You need to log in before you can comment on or make changes to this bug.