Re: vnc over ssh
From: Mike (nomail_at_redterra.net)
Date: 06/21/03
- Previous message: Owen Dunn: "Re: remote-controlled printing"
- In reply to: Nick Williams: "vnc over ssh"
- Next in thread: Nick Williams: "Re: vnc over ssh"
- Reply: Nick Williams: "Re: vnc over ssh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 21 Jun 2003 23:41:32 +0800
Greetings Nick,
I think that perhaps you have misunderstood the tunnelling feature of
SSH (or I am misunderstanding your question). The 'local' tunnelling
parameters are:
-L<Local listening port>:<Remote Address>:<Remote Port>
Both the <Remote Address> and <Remote Port> are in the remote machine's
context, so 'localhost' is really 127.0.0.1 on remoateAddress.org. The
same goes for <Remote Port>.
So the following line would set up the tunnel to VNC the remote machine
?ssh remoteAddress.org -l XXXX -L5900:localhost:5900
(You seem to be missing the '-L' prefix to the tunnel parameter)
There is no need to set up a secondary tunnel on the localhost as it is
already done. My final suggestion with be a two batch files like this
1. vnc.sh
#/bin/sh
sleep 30
vncviewer localhost:5900
2. start_ssh.sh
#/bin/sh
sh vnc.sh &
ssh XXXX@remoteAddress.org -L5900:localhost:5900
When you call start_ssh.sh you have 30 seconds to login sucessfully and
then vnc viewer is started. Not that pretty, but it works
Mike
Nick Williams wrote:
> greetings! i have set up a vnc server on a windows 2000 and a windows
> xp box and would like to connect to them over the internet. i have
> decided to connect over ssh. i have cygwin and openssh running on the
> vncServer machines.
>
> i run cygwin by clicking on a shortcut. the shortcut also calls
> vnc.bat. vnc.bat successfully runs in cygwin.
>
> i want to use this ability to set up my ssh connections so all i have
> to do is click on the cygwin shortcut and then the vncviewer shortcut.
>
> when i run cygwin without the vnc.bat i connect fine and vnc works
> using these commands...
> ?ssh remoteAddress.org -l XXXX 5900:localhost:22
> Enter password for XXXX:? YYYY
> XXXX@remoteAddress.org:? ssh localhost -l XXXX 22:localhost:5900
> Enter password for XXXX:? YYYY
>
> as i said... after doing this all i do is start the vncviewer and all
> is good.
>
> is there a one line command i can use to set up the port forwarding on
> both the viewing machine and the serving machine at the same time? i
> cant use this 2 command proccess in the bat file because the second
> line is not run until the first ssh command disconnects..
> ssh remoteAddress -l XXXX -L 5900:localhost:22 ...???
>
> thanx!!
> Nick Williams
- Previous message: Owen Dunn: "Re: remote-controlled printing"
- In reply to: Nick Williams: "vnc over ssh"
- Next in thread: Nick Williams: "Re: vnc over ssh"
- Reply: Nick Williams: "Re: vnc over ssh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|