Mailing List Archive

VNC Via ssh tunnel
Hello,



I am having difficulty establishing vnc connections via an ssh tunnel.
We have a series of independent LANs, each one has one computer with an
interface to the wider network. I need to be able to VNC through this
gateway computer to any other computer on the internal network. I have
been attempting to do this using an ssh tunnel, but it doesn't always
work.



I first establish the tunnel on the gateway machine with:



/usr/bin/ssh -L localport:remoteIP:5900 localhost sleep 60



to allow the tunnel to expose a unique port for each computer inside
the network and attempt to connect to that port with vncviewer.



So if I want to make a VNC connection to 192.168.103.12, I would set up
the tunnel



/usr/bin/ssh -L 12345:192.168.103.12:5900 localhost sleep 60



and connect to "vncviewer gateway:12345"



This seems to work about 50% of the time. The rest of the time I get



main: unable to connect to host: Connection refused (111)



It is more likely to connect when running realvnc from windows than
linux, but still not 100% of the time.



Has anyone done anything similar? Am I missing something very obvious
here?



Thanks for your help



James



_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
RE: VNC Via ssh tunnel [ In reply to ]
What OS are you running on the guest machine?
What OS are you running on the gateway machine.
What OS are you running on the target machines?

Cheers,
John



-----Original Message-----
From: vnc-list-bounces@realvnc.com [mailto:vnc-list-bounces@realvnc.com]
On Behalf Of James Hinchey
Sent: Thursday, May 05, 2011 10:34 PM
To: vnc-list@realvnc.com
Subject: VNC Via ssh tunnel


Hello,



I am having difficulty establishing vnc connections via an ssh tunnel.
We have a series of independent LANs, each one has one computer with an
interface to the wider network. I need to be able to VNC through this
gateway computer to any other computer on the internal network. I have
been attempting to do this using an ssh tunnel, but it doesn't always
work.



I first establish the tunnel on the gateway machine with:



/usr/bin/ssh -L localport:remoteIP:5900 localhost sleep 60



to allow the tunnel to expose a unique port for each computer inside
the network and attempt to connect to that port with vncviewer.



So if I want to make a VNC connection to 192.168.103.12, I would set up
the tunnel



/usr/bin/ssh -L 12345:192.168.103.12:5900 localhost sleep 60



and connect to "vncviewer gateway:12345"



This seems to work about 50% of the time. The rest of the time I get



main: unable to connect to host: Connection refused (111)



It is more likely to connect when running realvnc from windows than
linux, but still not 100% of the time.



Has anyone done anything similar? Am I missing something very obvious
here?



Thanks for your help



James



_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: VNC Via ssh tunnel [ In reply to ]
Hello guys

James, when you put /and connect to "vncviewer gateway:12345"/, gateway in
this case is your remote IP or localhost IP ?!?!, the correct is a localhost
IP, where you are creating the tunnel.

Cheers

On Thu, May 5, 2011 at 11:34 AM, James Hinchey <James.Hinchey@adacel.com>wrote:

> Hello,
>
>
>
> I am having difficulty establishing vnc connections via an ssh tunnel.
> We have a series of independent LANs, each one has one computer with an
> interface to the wider network. I need to be able to VNC through this
> gateway computer to any other computer on the internal network. I have
> been attempting to do this using an ssh tunnel, but it doesn't always
> work.
>
>
>
> I first establish the tunnel on the gateway machine with:
>
>
>
> /usr/bin/ssh -L localport:remoteIP:5900 localhost sleep 60
>
>
>
> to allow the tunnel to expose a unique port for each computer inside
> the network and attempt to connect to that port with vncviewer.
>
>
>
> So if I want to make a VNC connection to 192.168.103.12, I would set up
> the tunnel
>
>
>
> /usr/bin/ssh -L 12345:192.168.103.12:5900 localhost sleep 60
>
>
>
> and connect to "vncviewer gateway:12345"
>
>
>
> This seems to work about 50% of the time. The rest of the time I get
>
>
>
> main: unable to connect to host: Connection refused (111)
>
>
>
> It is more likely to connect when running realvnc from windows than
> linux, but still not 100% of the time.
>
>
>
> Has anyone done anything similar? Am I missing something very obvious
> here?
>
>
>
> Thanks for your help
>
>
>
> James
>
>
>
> _______________________________________________
> VNC-List mailing list
> VNC-List@realvnc.com
> To remove yourself from the list visit:
> http://www.realvnc.com/mailman/listinfo/vnc-list
>



--
______________
Atenciosamente
Waldirio
msn: waldirio@gmail.com
Skype: waldirio
Site: www.waldirio.com.br
Blog: blog.waldirio.com.br
LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646
PGP: www.waldirio.com.br/public.html
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
RE: VNC Via ssh tunnel [ In reply to ]
Guest = linux (CentOS 4)
Gateway = linux (CentOS 4)
Target = Windows or Linux

It seems to work most of the time if the guest is windows.

-----Original Message-----
From: John Serink [mailto:John_Serink@Trimble.com]
Sent: Friday, May 06, 2011 3:32 AM
To: James Hinchey; vnc-list@realvnc.com
Subject: RE: VNC Via ssh tunnel

What OS are you running on the guest machine?
What OS are you running on the gateway machine.
What OS are you running on the target machines?

Cheers,
John



-----Original Message-----
From: vnc-list-bounces@realvnc.com [mailto:vnc-list-bounces@realvnc.com]
On Behalf Of James Hinchey
Sent: Thursday, May 05, 2011 10:34 PM
To: vnc-list@realvnc.com
Subject: VNC Via ssh tunnel


Hello,



I am having difficulty establishing vnc connections via an ssh tunnel.
We have a series of independent LANs, each one has one computer with an
interface to the wider network. I need to be able to VNC through this
gateway computer to any other computer on the internal network. I have
been attempting to do this using an ssh tunnel, but it doesn't always
work.



I first establish the tunnel on the gateway machine with:



/usr/bin/ssh -L localport:remoteIP:5900 localhost sleep 60



to allow the tunnel to expose a unique port for each computer inside
the network and attempt to connect to that port with vncviewer.



So if I want to make a VNC connection to 192.168.103.12, I would set up
the tunnel



/usr/bin/ssh -L 12345:192.168.103.12:5900 localhost sleep 60



and connect to "vncviewer gateway:12345"



This seems to work about 50% of the time. The rest of the time I get



main: unable to connect to host: Connection refused (111)



It is more likely to connect when running realvnc from windows than
linux, but still not 100% of the time.



Has anyone done anything similar? Am I missing something very obvious
here?



Thanks for your help



James



_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
RE: VNC Via ssh tunnel [ In reply to ]
Gateway is the localhost and 12345 is the localhost port I need to have forwarded to the remote computer port 5900.



________________________________

From: Waldirio Manhães Pinheiro [mailto:waldirio@gmail.com]
Sent: Friday, May 06, 2011 4:24 AM
To: James Hinchey
Cc: vnc-list@realvnc.com
Subject: Re: VNC Via ssh tunnel



Hello guys



James, when you put /and connect to "vncviewer gateway:12345"/, gateway in this case is your remote IP or localhost IP ?!?!, the correct is a localhost IP, where you are creating the tunnel.



Cheers

On Thu, May 5, 2011 at 11:34 AM, James Hinchey <James.Hinchey@adacel.com> wrote:

Hello,



I am having difficulty establishing vnc connections via an ssh tunnel.
We have a series of independent LANs, each one has one computer with an
interface to the wider network. I need to be able to VNC through this
gateway computer to any other computer on the internal network. I have
been attempting to do this using an ssh tunnel, but it doesn't always
work.



I first establish the tunnel on the gateway machine with:



/usr/bin/ssh -L localport:remoteIP:5900 localhost sleep 60



to allow the tunnel to expose a unique port for each computer inside
the network and attempt to connect to that port with vncviewer.



So if I want to make a VNC connection to 192.168.103.12, I would set up
the tunnel



/usr/bin/ssh -L 12345:192.168.103.12:5900 localhost sleep 60



and connect to "vncviewer gateway:12345"



This seems to work about 50% of the time. The rest of the time I get



main: unable to connect to host: Connection refused (111)



It is more likely to connect when running realvnc from windows than
linux, but still not 100% of the time.



Has anyone done anything similar? Am I missing something very obvious
here?



Thanks for your help



James



_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list




--

______________
Atenciosamente
Waldirio
msn: waldirio@gmail.com
Skype: waldirio
Site: www.waldirio.com.br
Blog: blog.waldirio.com.br

LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646
PGP: www.waldirio.com.br/public.html



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: VNC Via ssh tunnel [ In reply to ]
Friend

Try create the tunnel in verbose mode (man ssh, I really don't remember the
syntax), and after that execute the command. You will see all steps, in that
moment, you'll be able to define (probably) what is the problem.

Cheers

On Fri, May 6, 2011 at 8:21 AM, James Hinchey <James.Hinchey@adacel.com>wrote:

> Guest = linux (CentOS 4)
> Gateway = linux (CentOS 4)
> Target = Windows or Linux
>
> It seems to work most of the time if the guest is windows.
>
>
> -----Original Message-----
> From: John Serink [mailto:John_Serink@Trimble.com]
> Sent: Friday, May 06, 2011 3:32 AM
> To: James Hinchey; vnc-list@realvnc.com
> Subject: RE: VNC Via ssh tunnel
>
> What OS are you running on the guest machine?
> What OS are you running on the gateway machine.
> What OS are you running on the target machines?
>
> Cheers,
> John
>
>
>
> -----Original Message-----
> From: vnc-list-bounces@realvnc.com [mailto:vnc-list-bounces@realvnc.com]
> On Behalf Of James Hinchey
> Sent: Thursday, May 05, 2011 10:34 PM
> To: vnc-list@realvnc.com
> Subject: VNC Via ssh tunnel
>
>
> Hello,
>
>
>
> I am having difficulty establishing vnc connections via an ssh tunnel.
> We have a series of independent LANs, each one has one computer with an
> interface to the wider network. I need to be able to VNC through this
> gateway computer to any other computer on the internal network. I have
> been attempting to do this using an ssh tunnel, but it doesn't always
> work.
>
>
>
> I first establish the tunnel on the gateway machine with:
>
>
>
> /usr/bin/ssh -L localport:remoteIP:5900 localhost sleep 60
>
>
>
> to allow the tunnel to expose a unique port for each computer inside
> the network and attempt to connect to that port with vncviewer.
>
>
>
> So if I want to make a VNC connection to 192.168.103.12, I would set up
> the tunnel
>
>
>
> /usr/bin/ssh -L 12345:192.168.103.12:5900 localhost sleep 60
>
>
>
> and connect to "vncviewer gateway:12345"
>
>
>
> This seems to work about 50% of the time. The rest of the time I get
>
>
>
> main: unable to connect to host: Connection refused (111)
>
>
>
> It is more likely to connect when running realvnc from windows than
> linux, but still not 100% of the time.
>
>
>
> Has anyone done anything similar? Am I missing something very obvious
> here?
>
>
>
> Thanks for your help
>
>
>
> James
>
>
>
> _______________________________________________
> VNC-List mailing list
> VNC-List@realvnc.com
> To remove yourself from the list visit:
> http://www.realvnc.com/mailman/listinfo/vnc-list
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> _______________________________________________
> VNC-List mailing list
> VNC-List@realvnc.com
> To remove yourself from the list visit:
> http://www.realvnc.com/mailman/listinfo/vnc-list
>



--
______________
Atenciosamente
Waldirio
msn: waldirio@gmail.com
Skype: waldirio
Site: www.waldirio.com.br
Blog: blog.waldirio.com.br
LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646
PGP: www.waldirio.com.br/public.html
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: VNC Via ssh tunnel [ In reply to ]
Hi james:

I uselinux to freesshd either directly or via a sarian DR6XXX router (digi transport) for the ssh tunnels. I had bad luck using the command line ssh client doing this so I compiled putty for linux and it works PERFECT!

Maybe give putty a try. Freesshd doesn't like the default ssh client from linux.

Cheers,
John

----- Original Message -----
From: James Hinchey <James.Hinchey@adacel.com>
To: John Serink; vnc-list@realvnc.com <vnc-list@realvnc.com>
Sent: Fri May 06 23:21:07 2011
Subject: RE: VNC Via ssh tunnel

Guest = linux (CentOS 4)
Gateway = linux (CentOS 4)
Target = Windows or Linux

It seems to work most of the time if the guest is windows.

-----Original Message-----
From: John Serink [mailto:John_Serink@Trimble.com]
Sent: Friday, May 06, 2011 3:32 AM
To: James Hinchey; vnc-list@realvnc.com
Subject: RE: VNC Via ssh tunnel

What OS are you running on the guest machine?
What OS are you running on the gateway machine.
What OS are you running on the target machines?

Cheers,
John



-----Original Message-----
From: vnc-list-bounces@realvnc.com [mailto:vnc-list-bounces@realvnc.com]
On Behalf Of James Hinchey
Sent: Thursday, May 05, 2011 10:34 PM
To: vnc-list@realvnc.com
Subject: VNC Via ssh tunnel


Hello,



I am having difficulty establishing vnc connections via an ssh tunnel.
We have a series of independent LANs, each one has one computer with an
interface to the wider network. I need to be able to VNC through this
gateway computer to any other computer on the internal network. I have
been attempting to do this using an ssh tunnel, but it doesn't always
work.



I first establish the tunnel on the gateway machine with:



/usr/bin/ssh -L localport:remoteIP:5900 localhost sleep 60



to allow the tunnel to expose a unique port for each computer inside
the network and attempt to connect to that port with vncviewer.



So if I want to make a VNC connection to 192.168.103.12, I would set up
the tunnel



/usr/bin/ssh -L 12345:192.168.103.12:5900 localhost sleep 60



and connect to "vncviewer gateway:12345"



This seems to work about 50% of the time. The rest of the time I get



main: unable to connect to host: Connection refused (111)



It is more likely to connect when running realvnc from windows than
linux, but still not 100% of the time.



Has anyone done anything similar? Am I missing something very obvious
here?



Thanks for your help



James



_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list