Preliminary and subject to change based on user experience

SSH tunnel setup

Initialise Kerberos credentials kinit mycernusername@CERN.CH

Edit/Create your $HOME/.ssh/config and add the following

Host lxtunnel
        HostName lxplus.cern.ch
        User mycernusername
        Protocol 2
        ForwardX11 no
        PasswordAuthentication no
        LocalForward 22000 np04-srv-013.cern.ch:22
        LocalForward 22001 np04-srv-013.cern.ch:5901
        LocalForward 22002 np04-srv-013.cern.ch:5902
        LocalForward 22003 np04-srv-013.cern.ch:5903
        LocalForward 22004 np04-srv-013.cern.ch:5904
        LocalForward 22005 np04-srv-013.cern.ch:5905
        LocalForward 22006 np04-srv-013.cern.ch:5906
        LocalForward 22007 np04-srv-013.cern.ch:5907
        LocalForward 22008 np04-srv-013.cern.ch:5908
        LocalForward 22009 np04-srv-013.cern.ch:5909

Host np13
        Hostname localhost
        Port 22000
        User mycernusername

Add some aliases to your .bashrc

alias lxtun="ssh -N -C -f -q lxtunnel ; sleep 1 ; [[ \$(ps auxwww | grep lxtunnel | grep -c -v grep) == 1 ]] && echo ok || echo not ok"
alias lxtunkill="for i in \`ps auxww | grep lxtunnel | grep -v grep | awk '{print \$2}'\`; do echo killing \$i; kill \$i; done"

Try the tunnel

source .bashrc
lxtun
should report "ok" - if not type lxtunkill and try again or check previous steps.

Try connect to np04-srv-013

 
ssh np13

VNC setup

ssh to np04-srv-013 and set a VNC password.

ssh np13
vncpasswd

Create/Replace the file $HOME/.vnc/xstartup with the following

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#exec /etc/X11/xinit/xinitrc
exec xfce4-session
Make sure the file is executable
chmod u+x xstartup

Start the VNC server and note the desktop number - e.g. ":1"

 
vncserver 
OUTPUT: New 'np04-srv-013:1 (mycernusername)' desktop is np04-srv-013*:1*

Connect via your favourite VNC client with the details Host = localhost Port = 22001 ... 22009 (last digit matches desktop number)

To kill vncserver

Log into np04-srv-013 and kill the relevant server:
ssh np13
vncserver -kill :1

-- KarolH - 2017-09-26

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2020-03-06 - MarcoRoda
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CENF All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 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