User Tools

Site Tools


institute_lorentz:institutelorentz_remoteaccess

This is an old revision of the document!


Remote Access to your Workstation

For security reasons, access to your Lorentz workstation is only possible within the Lorentz network.

Should you want to open an ssh session to your workstation and you are located outside the Lorentz network you can tunnel your request through ssh.lorentz.leidenuniv.nl. For example

ssh -f <your_username>@ssh.lorentz.leidenuniv.nl -L 2222:<your_workstation>.lorentz.leidenuniv.nl:22 -N

instructs your machine to `tunnel' requests to local port 2222 through ssh.lorentz.leidenuniv.nl to finally reach port 22 (sshd) on your workstation. Use ps to see if the command above executed successfully

ps  aux | grep ss[h]
your_username   6217  0.0  0.0  89612  2948 ?        Ss   13:19   0:00 ssh -f your_username@ssh.lorentz.leidenuniv.nl -L 2222:your_workstation.lorentz.leidenuniv.nl:22 -N

At this point you are ready to initiate an ssh session to your workstation

ssh -p 2222 localhost

NOTE: Should you want ssh to set the DISPLAY environment variable, you can use option -X when you run ssh. You can invoke the ssh manual pages by typing man ssh.

Another possible trick:

Locally (e.g. on your laptop), create a file .ssh/config with a section for the machine to which you want to log in, containing the ProxyCommand ssh option to do the tunnelling:

Host asselijn.lorentz.leidenuniv.nl asselijn
ProxyCommand /usr/bin/ssh -W %h:%p ssh.lorentz.leidenuniv.nl

And if you have a different username locally and on the institute desktops, that can be added like this:

Host asselijn.lorentz.leidenuniv.nl asselijn
ProxyCommand /usr/bin/ssh -W %h:%p username@ssh.lorentz.leidenuniv.nl
User username

If you need access to multiple hosts, just copy and edit the example above.

Using Putty

You will need to open two putty sessions. The first one opens a tunnel, the second one uses it. For the sake of clarity let us call the first session `Tunnel' and the second one `Tunnel_use'. In this example we will establish a connection to the Maris headnode novamaris through an ssh tunnel on ssh.lorentz.leidenuniv.nl.

Session 1: Tunnel

Open putty and create a session called Tunnel, then set it according to the snapshots below

Please note the settings in the port forwarding panel. We use an arbitrary port (2222), but you can choose any numbers above 1024 provided they are not currently in use. By pushing `Open', a terminal will appear so that you can authenticate using your Lorentz institute credentials. Leave this terminal open and proceed with the creation of session `Tunnel_use'

Now push `Open' and a terminal will appear asking your authentication credentials on novamaris. Any other putty connection to localhost:2222 will ssh directly to novamaris.

VNC: GNU/Linux

For detailed instructions on how to set up a vnc session you are encouraged to follow these instructions.

VNC: Windows Users

Please read here.

institute_lorentz/institutelorentz_remoteaccess.1470996638.txt.gz · Last modified: 2016/08/12 10:10 by lenocil