ssh+vnc

ssh+vnc

Post by hs » Fri, 11 Jun 2004 03:36:59



Hi folks, I just installed suse 9.1 and it runs fine but could somebody tell
how to make connection from win2k pc to that linux computer with vnc
tunneled to ssh. I can make ssh connection but could not find good documents
how to "tunnel" that vnc. Hope you understand my miserable explanation,
Please help!

Haza

 
 
 

ssh+vnc

Post by Ian Northeas » Fri, 11 Jun 2004 05:33:33



> Hi folks, I just installed suse 9.1 and it runs fine but could somebody
> tell how to make connection from win2k pc to that linux computer with vnc
> tunneled to ssh. I can make ssh connection but could not find good
> documents how to "tunnel" that vnc. Hope you understand my miserable
> explanation, Please help!

I am assuming the VNC server is running on SuSE and you want to connect to
it from Win2K over an SSH tunnel. I am also assuming you are using putty
as your Windows SSH client (if you're not you should be.
http://www.chiark.greenend.org.uk/~sgtatham/putty/).

You need one or two local tunnels. If you are using an actual VNC client,
you only need one, to port 590x where x is the display number of your VNC
server (it normally defaults to 1, it tells you when you start it). If you
want to use the Java client in a web browser, you additionally need to
tunnel to port 580x.

On a command line ssh the syntax is:

.. -L 590x:localhost:590x [ -L 580x:localhost:580x ]

In putty, in the "Connection/SSH/Tunnels" window, you specify "local" and
put "590x" in "Source port" and "localhost:590x" in "Destination". If you
need the second tunnel, repeat the operation.Putty allows you to save the
configuration so you don't have to keep doing this.

The port numbers don't actually have to match at both ends but I find it a
lot easier if they do. SSH tunnelling is a bit tricky to get your head
around without adding unnecessary complication.

Then you point your VNC client at localhost (or 127.0.0.1) with the
appropriate offset, or your web browser at http://localhost:580x.

Regards, Ian

 
 
 

1. ssh...vnc...iptables...ugh!

thought i had it figured...apparently NOT...ugh!

anyone know how vnc works with ssh through a firewall?
i can ssh from my home machine to my linux firewall...so i know it works,
but i'm not sure if port 59 must also be opened for the vnc.  all the
examples that i have found in regard to ssh and vnc do not make any mention
of firewalls.

what i have:
- home environment with putty and vncviewer installed
    HOME='xxx.xxx.xxx.123' #static ip
- work environment linux machine with iptables and sshd running on it; and a
private machine running a vnc server.
    EXT_IF='eth1'
    EXT_IP='xxx.xxx.xxx.456'  #static ip
    VNC_IP='192.168.1.3'

- iptables
  /sbin/iptables -A INPUT -i $EXT_IF -p tcp --dport 22 -m state --state
ESTABLISHED,NEW -j ACCEPT
  /sbin/iptables -A OUTPUT -o $EXT_IF -p tcp --sport 22 -m state --state
ESTABLISHED -j ACCCEPT

tried to run the following ssh command from the 'home' machine, but it
doesn't work:
putty -L 5954:192.168.1.3:5900 207.228.76.242

any insight is greatly appreciated!
heidi

2. Web Mail on Cobalt Raq

3. Ssh, VNC, X11, Remote desktops in Linux: I'm confused

4. Best linux to use?

5. SSH-VNC works on LAN but not through WAN

6. Linux/X on Toshiba 425CDS laptop

7. VNC tunnelling through SSH

8. 2.5.7-pre2 link error in kernel.o with nfs but !nfsd configured

9. Trouble using VNC thru a ssh tunnel

10. VNC+SSH+IP Masquerading

11. Performance of VNC tunnelled through compressed SSH

12. VNC SSH and Linux Security Holes

13. How to tunnel vnc through ssh (accessing home from work)