Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 730346

Summary: Unable to connect to a display using ssh tunnelling
Product: Red Hat Enterprise Linux 6 Reporter: Daniel Berrangé <berrange>
Component: virt-viewerAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0CC: acathrow, dallan, mjenner, mzhan, rwu, zpeng
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 15:07:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.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.4.218
    .....
  the guest can open w/o error.

  change ssh port to 9000
   #virt--viewer -c qemu+ssh://root.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.6.166:9000
   .....
  the guest can open w/o error.
 
test with spice:
   default port:22
  #virt-viewer -c qemu+ssh://root.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.6.166
  .....
 the guest can open w/o error.

   ssh port:9000
   #virt-viewer -c qemu+ssh://root.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.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