* [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
@ 2006-10-10 16:46 Mark Shields
2006-10-10 17:10 ` Mauro Faccenda
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Mark Shields @ 2006-10-10 16:46 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
I have a gentoo box setup as a router with 3 servers behind it (all 4
servers are running gentoo). Right now I simply have port 5901 to forward
from the router to my vnc server so I can access it remotely. I've looked
on the gentoo forums and online but haven't been able to find any solid
information on how to tunnel 5901 through ssh through the router to the vnc
server. Basically, client -> router -> vnc server port 5901, but over ssh.
Any ideas?
--
- Mark Shields
[-- Attachment #2: Type: text/html, Size: 524 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 16:46 [gentoo-user] VNC over SSH (VNC session is non-local to SSH) Mark Shields
@ 2006-10-10 17:10 ` Mauro Faccenda
2006-10-10 17:13 ` Richard Fish
2006-10-11 1:03 ` W.Kenworthy
2 siblings, 0 replies; 13+ messages in thread
From: Mauro Faccenda @ 2006-10-10 17:10 UTC (permalink / raw
To: gentoo-user; +Cc: Mark Shields
On Tuesday 10 October 2006 13:46, Mark Shields wrote:
> I have a gentoo box setup as a router with 3 servers behind it (all 4
> servers are running gentoo). Right now I simply have port 5901 to forward
> from the router to my vnc server so I can access it remotely. I've looked
> on the gentoo forums and online but haven't been able to find any solid
> information on how to tunnel 5901 through ssh through the router to the vnc
> server. Basically, client -> router -> vnc server port 5901, but over ssh.
> Any ideas?
if you want to connect to a vnc session on the ssh server:
ssh -L 5901:localhost:5901 user@host_of_ssh_server
then:
vncviewer localhost:1
if you want to connect to another box at the same network of the ssh server:
ssh -L 5901:ip_of_another_box:5901 user@host_of_ssh_serverr
then:
vncviewer localhost:1
got the idea?
hope it helps.
[]'s
.m
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 16:46 [gentoo-user] VNC over SSH (VNC session is non-local to SSH) Mark Shields
2006-10-10 17:10 ` Mauro Faccenda
@ 2006-10-10 17:13 ` Richard Fish
2006-10-10 17:33 ` Mark Shields
2006-10-11 1:03 ` W.Kenworthy
2 siblings, 1 reply; 13+ messages in thread
From: Richard Fish @ 2006-10-10 17:13 UTC (permalink / raw
To: gentoo-user
On 10/10/06, Mark Shields <laebshade@gmail.com> wrote:
> I have a gentoo box setup as a router with 3 servers behind it (all 4
> servers are running gentoo). Right now I simply have port 5901 to forward
> from the router to my vnc server so I can access it remotely. I've looked
> on the gentoo forums and online but haven't been able to find any solid
> information on how to tunnel 5901 through ssh through the router to the vnc
> server. Basically, client -> router -> vnc server port 5901, but over ssh.
> Any ideas?
You want ssh port forwarding....you can read the ssh man page, but
basically you want:
# ssh -L localhost:5901:remotehost:5901 &
# vncviewer localhost:5901
HTH,
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 17:13 ` Richard Fish
@ 2006-10-10 17:33 ` Mark Shields
2006-10-10 17:48 ` Richard Fish
0 siblings, 1 reply; 13+ messages in thread
From: Mark Shields @ 2006-10-10 17:33 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]
On 10/10/06, Richard Fish <bigfish@asmallpond.org> wrote:
>
> On 10/10/06, Mark Shields <laebshade@gmail.com> wrote:
> > I have a gentoo box setup as a router with 3 servers behind it (all 4
> > servers are running gentoo). Right now I simply have port 5901 to
> forward
> > from the router to my vnc server so I can access it remotely. I've
> looked
> > on the gentoo forums and online but haven't been able to find any solid
> > information on how to tunnel 5901 through ssh through the router to the
> vnc
> > server. Basically, client -> router -> vnc server port 5901, but over
> ssh.
> > Any ideas?
>
> You want ssh port forwarding....you can read the ssh man page, but
> basically you want:
>
> # ssh -L localhost:5901:remotehost:5901 &
> # vncviewer localhost:5901
>
> HTH,
> -Richard
> --
> gentoo-user@gentoo.org mailing list
>
>
Thank you Richard and Mauro, but this wasn't what I was looking for. The
vnc and the ssh server are not the same. I am familiar with and have no
problem using the particular setup you mention; however, it will not work
for what I want to accomplish. I want to tunnel vnc traffic over ssh to my
router, then forward that vnc traffic to the actual vnc server. I think the
problem lies somewhere in my iptables rules. I did have: /sbin/iptables -t
nat -A PREROUTING -p TCP --dport 5901 -i ${WAN} -j DNAT --to
192.168.0.235:5901 , which will forward it correctly if I connect through
5901, but tunneling via SSH doesn't work. Again, I want to tunnel the vnc
connection to the router, which will then forward the port 5901 traffic to
the vnc server.
Btw, I'm using Putty and Tightvnc on a WinXP machine (work PC) to connect to
the vnc server.
--
- Mark Shields
[-- Attachment #2: Type: text/html, Size: 2246 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 17:33 ` Mark Shields
@ 2006-10-10 17:48 ` Richard Fish
2006-10-10 17:58 ` Mark Shields
0 siblings, 1 reply; 13+ messages in thread
From: Richard Fish @ 2006-10-10 17:48 UTC (permalink / raw
To: gentoo-user
On 10/10/06, Mark Shields <laebshade@gmail.com> wrote:
> Thank you Richard and Mauro, but this wasn't what I was looking for. The
> vnc and the ssh server are not the same.
ssh port forwarding is not limited to just the machine you are logging
into. It will forward the connection to another host. So I think
this is still what you want:
# ssh -L localhost:5901:vnchost:5901 routerhost
This will cause the ssh client to forward any connections to 5901 on
localhost to be forwarded to the server on routerhost, which will then
make the connection to vnchost port 5901. No need to muck with
iptables rules at all here.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 16:46 [gentoo-user] VNC over SSH (VNC session is non-local to SSH) Mark Shields
2006-10-10 17:10 ` Mauro Faccenda
2006-10-10 17:13 ` Richard Fish
@ 2006-10-11 1:03 ` W.Kenworthy
2 siblings, 0 replies; 13+ messages in thread
From: W.Kenworthy @ 2006-10-11 1:03 UTC (permalink / raw
To: gentoo-user
Check out zebedee - unlike ssh, its designed specifically for this type
of thing (esp VNC) and as a consequence is more flexible. Also works
with doze etc.
Billk
On Tue, 2006-10-10 at 12:46 -0400, Mark Shields wrote:
> I have a gentoo box setup as a router with 3 servers behind it (all 4
> servers are running gentoo). Right now I simply have port 5901 to
> forward from the router to my vnc server so I can access it remotely.
> I've looked on the gentoo forums and online but haven't been able to
> find any solid information on how to tunnel 5901 through ssh through
> the router to the vnc server. Basically, client -> router -> vnc
> server port 5901, but over ssh. Any ideas?
>
> --
> - Mark Shields
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
@ 2006-10-10 19:27 Sieb, Glenn E (Glenn)
2006-10-10 21:43 ` Mick
0 siblings, 1 reply; 13+ messages in thread
From: Sieb, Glenn E (Glenn) @ 2006-10-10 19:27 UTC (permalink / raw
To: gentoo-user
richard.j.fish@gmail.com wrote:
> I don't use putty, but I believe pretty much the same way.
> You should be able to enter vnchost as the "destination host
> name" even while logging into your router. [1]
You can do it via the command line, or you can create a saved session too. Under Connection->SSH->Tunnels you can enter ports to forward.. then, once you've set your key up and the machine &c &c, you can save the session--then every time you connect to that saved session, you have your VNC ports all ready.
Best,
--Glenn
--
Glenn E. Sieb, MTS
Bell Laboratories
sieb@lucent.com
+1 732 949 5453
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 19:27 Sieb, Glenn E (Glenn)
@ 2006-10-10 21:43 ` Mick
2006-10-10 21:55 ` Mark Shields
0 siblings, 1 reply; 13+ messages in thread
From: Mick @ 2006-10-10 21:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 921 bytes --]
On Tuesday 10 October 2006 20:27, Sieb, Glenn E (Glenn) wrote:
> richard.j.fish@gmail.com wrote:
> > I don't use putty, but I believe pretty much the same way.
> > You should be able to enter vnchost as the "destination host
> > name" even while logging into your router. [1]
>
> You can do it via the command line, or you can create a saved session too.
> Under Connection->SSH->Tunnels you can enter ports to forward.. then, once
> you've set your key up and the machine &c &c, you can save the
> session--then every time you connect to that saved session, you have your
> VNC ports all ready.
You should be able to set up the whole string under the field
called "Destination" and after you click add, edit it manually in the field
above.
However, I wonder if since you are traversing machines and you keep forwarding
ports, what you want to use is PuTTY's agent forwarding?
--
Regards,
Mick
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 21:43 ` Mick
@ 2006-10-10 21:55 ` Mark Shields
2006-10-11 7:00 ` Mick
0 siblings, 1 reply; 13+ messages in thread
From: Mark Shields @ 2006-10-10 21:55 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]
On 10/10/06, Mick <michaelkintzios@gmail.com> wrote:
>
> On Tuesday 10 October 2006 20:27, Sieb, Glenn E (Glenn) wrote:
> > richard.j.fish@gmail.com wrote:
> > > I don't use putty, but I believe pretty much the same way.
> > > You should be able to enter vnchost as the "destination host
> > > name" even while logging into your router. [1]
> >
> > You can do it via the command line, or you can create a saved session
> too.
> > Under Connection->SSH->Tunnels you can enter ports to forward.. then,
> once
> > you've set your key up and the machine &c &c, you can save the
> > session--then every time you connect to that saved session, you have
> your
> > VNC ports all ready.
>
> You should be able to set up the whole string under the field
> called "Destination" and after you click add, edit it manually in the
> field
> above.
>
> However, I wonder if since you are traversing machines and you keep
> forwarding
> ports, what you want to use is PuTTY's agent forwarding?
> --
> Regards,
> Mick
>
>
>
Guys, there's no need to keep replying. Thanks for the help, but I'm able
to do it now (have been for the past 4 e-mails)
--
- Mark Shields
[-- Attachment #2: Type: text/html, Size: 1588 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
2006-10-10 21:55 ` Mark Shields
@ 2006-10-11 7:00 ` Mick
0 siblings, 0 replies; 13+ messages in thread
From: Mick @ 2006-10-11 7:00 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
On Tuesday 10 October 2006 22:55, Mark Shields wrote:
> Guys, there's no need to keep replying. Thanks for the help, but I'm able
> to do it now (have been for the past 4 e-mails)
I'm glad you got it sorted Mark.
A vaguely related but quite O/T question: would you perhaps know why when I
select "connect to local ports only" (in the VNC server running on a WinXP
box, under the Properties tab Connections) to stop it listening to ports
connected to the Internet, I can no longer connect from another WinXP box
through ssh port forwarding? No problem connecting to the VNC server from my
Gentoo box, or from the WinXP box using Knoppix. The error that comes up on
the VNC viewer is something like "the connection was unexpectedly terminated,
would you like to try again". Telnet-ing through the forwarded port
similarly fails - the telenet session hangs waiting for a response from the
server. As soon as I remove the "connect to local ports only" the WinXP VNC
viewer connects happily again. Is this a WinXP bug?
--
Regards,
Mick
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-10-11 10:31 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10 16:46 [gentoo-user] VNC over SSH (VNC session is non-local to SSH) Mark Shields
2006-10-10 17:10 ` Mauro Faccenda
2006-10-10 17:13 ` Richard Fish
2006-10-10 17:33 ` Mark Shields
2006-10-10 17:48 ` Richard Fish
2006-10-10 17:58 ` Mark Shields
[not found] ` <200610102001.43039.bo.andresen@zlin.dk>
2006-10-10 18:08 ` Mark Shields
2006-10-10 18:14 ` Richard Fish
2006-10-11 1:03 ` W.Kenworthy
-- strict thread matches above, loose matches on Subject: below --
2006-10-10 19:27 Sieb, Glenn E (Glenn)
2006-10-10 21:43 ` Mick
2006-10-10 21:55 ` Mark Shields
2006-10-11 7:00 ` Mick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox