Bug 489629 - Connection to VNC server tunneled over ssh refused in some circumstances
Summary: Connection to VNC server tunneled over ssh refused in some circumstances
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kvm
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Glauber Costa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-11 00:38 UTC by Jonathan Underwood
Modified: 2009-03-11 11:59 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-03-11 11:30:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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