Bug 489629

Summary: Connection to VNC server tunneled over ssh refused in some circumstances
Product: [Fedora] Fedora Reporter: Jonathan Underwood <jonathan.underwood>
Component: kvmAssignee: Glauber Costa <gcosta>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: berrange, clalance, ehabkost, gcosta, markmc, quintela, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-11 11:30:22 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 Jonathan Underwood 2009-03-11 00:38:00 UTC
Description of problem:
On a machine, let's call it VirtHost, I start a guest OS instance running under kvm. On VirtHost I can start a VNC viewer (I'll use vinagre throughout) and can connect to my guest OS as expected on port 5900.

Now I move to a different machine (let's call it RemoteHost) and issue the command:

ssh -L 6900:localhost:5900 VirtHost

and now I can run a VNC viewer on RemoteHost connecting to localhost::6900 in order to access the guest running on VirtHost via VNC. All well and good and working as expected.

However, now on VirtHost if I instead have these lines in my .ssh/config file:

Host VirtHost
     LocalForward localhost:6900 VirtHost:5900

and then ssh in to VirtHost I find I cannot connect localhost::6900 in order to connect to the guest OS, and in the ssh session I see:
channel 3: open failed: connect failed: Connection refused

This did work on F-9.

I'm not sure if this is a kvm or libvirt of openssh problem. Reporting against kvm initially.


Version-Release number of selected component (if applicable):
openssh-5.1p1-3.fc10.x86_64 (on both machines)
libvirt-python-0.5.1-2.fc10.x86_64
libvirt-0.5.1-2.fc10.x86_64
kvm-74-10.fc10.x86_64

Comment 1 Daniel Berrangé 2009-03-11 11:30:22 UTC
Works just fine for me - I think you have your .ssh/config on the wrong host - it needs to be configured on the host you're ssh'ing from, not to. In any case this isn't a KVM or libvirt bug, since neither care about ssh forwarding.

Comment 2 Jonathan Underwood 2009-03-11 11:59:07 UTC
Yes, sorry, the line in my bug report that read:

"However, now on VirtHost if I instead have these lines in my .ssh/config file:"

should have read:

"However, now on RemoteHost if I instead have these lines in my .ssh/config file:"

I have however tracked down the problem - it's a "feature" of the present version of openssh - it all works as expected if I replace the hostnames in the config file with IPV4 hostnames, otherwise openssh tries IPV6 ones.

Sorry for the noise.