Re: vnc over ssh

From: Mike (nomail_at_redterra.net)
Date: 06/21/03

  • Next message: Nick Williams: "Re: vnc over ssh"
    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


  • Next message: Nick Williams: "Re: vnc over ssh"

    Relevant Pages

    • vnc over ssh
      ... decided to connect over ssh. ... i run cygwin by clicking on a shortcut. ... is there a one line command i can use to set up the port forwarding on ...
      (comp.security.ssh)
    • Re: What is The SSH?
      ... Building and Using SSH Tunnels ... What is an SSH tunnel? ... how to use it to make a connection to a server. ... You will need a working SSH client and server installation to build and test ...
      (microsoft.public.windows.server.networking)
    • ADO.NET/Jet connection string using SSH tunnel
      ... SSH Server running on a machine on our local network - on that machine ... "server," using an ADO.NET connection string that somehow uses the ... tunnel to specify the location of the database it wants to connect to. ... I know I will use the sshg3 command (which I understand is Tectia's ...
      (comp.security.ssh)
    • Re: Confused about tightvnc and ssh tunnel
      ... > How do I tunnel vnc connection through ssh? ... > ssh from the cygwin distribution. ...
      (comp.unix.bsd.freebsd.misc)
    • RE: HOWTO Ping LAN???
      ... SSH to the box, and tunnel to other internal machines ... > network is by tunneling. ...
      (freebsd-questions)