Remote Connection using VNC

Server Setup

Linux Server (SLC)

First the ports used by VNC (5901 and following) have to be opened using iptables (see documentation):
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 5901:5905 -j ACCEPT
Restart iptables to take over the modifications
service iptables restart
Now the VNC server can be started
vncserver -geometry 1920x1080 :1
The geometry option allows to set the screen sizes of the x-server. The last number determines the port used for this vncserver +5900, i.e. :1 refers to port 5901

Setting up the SSH Tunnel and connecting to the server

In order to secure the connection it is recommended to use an SSH tunnel, since otherwise the connection is not encrypted (see link)

For example

ssh -L
opens a tunnel to via lxplus (mandatory when connecting from outside CERN) and maps port 5901 of the server to the local port 5901. The connection to the VNC server can now be done by connecting your VNC client to localhost:5901.
Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2013-09-10 - ChristianGrefe
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CLIC All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback