Bug 730346 - Unable to connect to a display using ssh tunnelling
Unable to connect to a display using ssh tunnelling
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-12 10:42 EDT by Daniel Berrange
Modified: 2011-12-06 10:07 EST (History)
6 users (show)

See Also:
Fixed In Version: virt-viewer-0.4.1-3.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 10:07:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2011-08-12 10:42:49 EDT
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 Berrange 2011-08-14 16:58:23 EDT
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 01:25:32 EDT
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 10:07:13 EST
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.