Login to ALICE or SHARK from Windows

There are different ways to login to ALICE or SHARK from Windows. This page contains instructions for various applications that provide a command line interface to ALICE and SHARK, but you can also get a complete remote desktop on both clusters using X2Go.

Overview

The following table gives an overview of the main features that are available for the applications described below.

Application

Command line interface

Integrated X11 forwarding

Full remote desktop

File Transfer from local workstation

Password-less login with standard SSH keys

Password-less login with PuTTY ssh keys (and PuTTY pageant)

Application

Command line interface

Integrated X11 forwarding

Full remote desktop

File Transfer from local workstation

Password-less login with standard SSH keys

Password-less login with PuTTY ssh keys (and PuTTY pageant)

PowerShell

(command line: scp only, no rsync)

Windows Subsystem for Linux

(command line: scp, rsync, etc)

(not by default)

MobaXTerm

(command line and drag-and-drop file explorer)

PuTTY

(possible with additional software)

(using pscp or psftp)

(requires conversion to PuTTY-usable format)

X2Go

not necessary

(local directory can be mounted directly)

WinSCP (primarily suited for data transfer)

(limited functionality)

(file browser interface for local and remote host with drag-and-drop capability and sync)

PowerShell

For Windows 10 build 1809 and higher, OpenSSH is available for PowerShell. This allows you to use PowerShell to connect to ALICE using ssh without any additional third-party tools for most purposes.

While PowerShell has its own syntax and commands, it is possible to use certain Linux commands within PowerShell.

Check if you already have OpenSSH installed. You can open PowerShell for example by opening the start menu and start typing "PowerShell". Under "Apps", you should see "Windows PowerShell". Start it and type

ssh -V

This should show the version of OpenSSH that you are using. If it does not work, then install OpenSSH for PowerShell before continuing.

Do you need multiple command line sessions?

There is also a tool called Windows Terminal which allows you to use different command line environments on Windows including PowerShell. Windows Terminal allows to open multiple command line sessions as tabs.

Except for the limitations listed below, using ssh with PowerShell works in the same way as on Linux

Known Limitations

  • It is currently not possible to do X11 forwarding natively with PowerShell

  • The command ssh-copy-id is not available, but you can copy the keys manually

  • Only scp is available in PowerShell

First time users

If you are a first time user, we recommend to go through the corresponding section for Linux users: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37748788/Login+to+ALICE+or+SHARK+from+Linux#For-first-time-users-or-%E2%80%9Cthe-most-basic-way%E2%80%9D

Regular users

If you decide to use PowerShell on a regular basis, we recommend that you setup your ssh config. You can also make use of password-less login using ssh keys with PowerShell.

SSH config setup

While syntax and usage of the ssh config file is the same as for Linux users, creating the ssh config file requires some additional steps on Windows.

Text editors on Windows

For working with a Linux-based cluster such as ALICE or SHARK from Windows, we recommend to install an alternative text file editor. The main reason is that the editor needs to be able to save text files with the line ending properly formatted for Linux. Windows (including the build-in notepad editor) encodes line endings in a different way which can lead to issues when such text files are read or executed on the cluster. There is a great variety of applications freely available. Prominent examples are "Notepad++" and "Visual Studio Code".

First, you need to make sure that you have a directory called “.ssh” in your home directory on Windows which is usually something like C:\Users\<YOUR_WINDOWS_USERNAME>. You can check this using PowerShell:

PS C:\> cd $HOME PS C:\> ls .ssh

If the directory “.ssh” directory does not exists, create it for example with the File explorer or with PowerShell.

PS C:\Users\me> mkdir .ssh

Next, you need to create a text file called “config” in the “.ssh” directory and add the ssh config settings for ALICE or SHARK as described here: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37748788/Login+to+ALICE+or+SHARK+from+Linux#For-regular-users-or-%E2%80%9Cthe-more-elegant-way%E2%80%9D

The name of the file “config” cannot have a file ending, i.e., it cannot be called something like “config.txt”.

Saving a file without file ending is straightforward with alternative editors such as “Notepad++” or “Visual Studio Code”, but not with the build-in notepad editor. Alternatively, you can also user PowerShell to rename the file by running for example mv config.txt config

Password-less login with ssh keys

Password-less login with ssh keys is possible with PowerShell. However, the procedure is slightly different from Linux described in https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37748788/Login+to+ALICE+or+SHARK+from+Linux#Making-logins-even-more-convenient-with-ssh-keys because the command ssh-copy-id is not available.

First create a set of ssh keys using for example ssh-keygen.exe -t rsa -b 4096 or ssh-keygen.exe -t ed25519 in PowerShell.

Once you have a set of keys, you need to copy the public key manually to the .ssh/authorized_keys file in your home directory on the ssh gateway and on one of the login nodes.

If you are not using the default name for your ssh key, then you need to adjust your ssh config settings as described here: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37748788/Login+to+ALICE+or+SHARK+from+Linux#Using-ssh-keys-with-custom-names

Windows Subsystem for Linux

If you have installed the Windows Subsystem for Linux (WSL), you can follow the instructions on https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37748788 in order to setup your connection.

Known Limitations

  • It is currently not possible to do X11 forwarding natively with WSL.

MobaXTerm

With MobaXTerm, you have a build-in SSH shell/terminal, an embedded X11 server, and a file explorer that allows drag-in-drop for moving files to and from the cluster. With this, you do not have to worry about setting up a special X11 server for showing graphical output on your Windows workstation or an alternative program for moving files.

First, go to the MobaXterm website: MobaXterm and download the latest version (here is the direct download link: Download). You can either install it on your local workstation or get the portable version.

Now, you can start MobaXTerm and create a SSH session:

 

ALICE

SHARK

 

ALICE

SHARK

For the session type choose: SSH and press OK

For the session type choose: SSH and press OK

In “Basic SSH settings”, specify the following settings:

  • Remote host: login1.alice.universiteitleiden.nl or login2.alice.universiteitleiden.nl

  • Tick “Specify username” and enter your ALICE user name in the field

In “Basic SSH settings”, specify the following settings:

  • Remote host: res-hpc-lo02.researchlumc.nl or res-hpc-lo04.researchlumc.nl

  • Tick “Specify username” and enter your ALICE user name in the field

If you intend to use this session to connect to SHARK from within the LUMC, you can finish the setup here by clicking on “OK”.

Otherwise, continue here to specify certain additional settings.

Next, click on “Network settings” and then on the button “SSH gateway (jump host)

If you want to setup a connection with MobaXTerm for connecting to SHARK from outside the LUMC, click on “Network settings” and then on the button “SSH gateway (jump host).

 

Specify the following settings:

  • Gateway host: ssh-gw.alice.universiteitleiden.nl

  • Username: Your ALICE user name

Then, confirm by clicking on “OK”.

Now, you are back on the previous window and you can finalize the setup by clicking on “OK”

Specify the following settings:

  • Gateway host: res-ssh-alg01.researchlumc.nl

  • Username: Your SHARK user name

Then, confirm by clicking on “OK”.

Now, you are back on the previous window and you can finalize the setup by clicking on “OK”

 

MobaXTerm will now try to connect you to ALICE.

First, you will be asked to provide the password for logging in to the ssh gateway:

If successful, you need to type in your password one more time to log in to the login node:

Note that in contrast to the pop-up window for the login to the gateway, you will not see anything when you type in or copy-paste your password for the login node. This completely normal when using ssh on the command line.

MobaXTerm will now try to connect you to ALICE.

If you set your session up to use the LUMC ssh gateway, you will be asked to provide the password for the ssh gateway first:

If successful or if you directly log in to the login node, you need to type your password one more time to log in to the login node:

Note that in contrast to the pop-up window for the login to the gateway, you will not see anything when you type in or copy-paste your password for the login node. This completely normal when using ssh on the command line.

 

After a successful login, you will have a command line interface available on ALICE and to the left of it, there will be a file explorer showing you all the files in your home directory (“sftp” tab). You can navigate around in it just as you would on your local file explorer.

 

 

After a successful login, you will have a command line interface available on ALICE and to the left of it, there will be a file explorer showing you all the files in your home directory (“sftp” tab). You can navigate around in it just as you would on your local file explorer.

 

In order to keep the ssh connection from breaking up after a few minutes of being idle, go to "Settings->Configuration->SSH" and enable the setting "SSH keepalive" under "SSH Settings".

PuTTY

PuTTY is a simple terminal ssh shell (putty homepage, putty download). PuTTY is available for installation or as a portable version.

Setting up PuTTY to use an ssh gateway server is somewhat different from logging in directly to a server. Therefore, we will provide instructions for direct access first (Connecting with PuTTY without using an ssh gateway)

If you are using ALICE or SHARK from outside the LUMC, proceed to the next section to set up PuTTY for using an ssh gateway (Connecting with PuTTY using an ssh gateway).

Connecting with PuTTY without using an ssh gateway

 

ALICE

SHARK

 

ALICE

SHARK

 

For ALICE, please see Connecting with PuTTY using an ssh gateway

After you have started PuTTY, go first to the category “Connection” and set “Second between keepalives” to 60. Otherwise the connection will automatically terminated after a few minutes.

Then switch back to the category “Session”

This has to be done for every connection that you want to set up.

 

Set as “Host Name” either res-hpc-lo02.researchlumc.nl or res-hpc-lo04.researchlumc.nl

We recommend that you save the settings for this session:

  • Specify a name in “Saved Settings”, e.g., “shark_login1” or “shark_login2”

  • Then click on the “Save” button

You can set up sessions for both login nodes.

When you are finished, click on the button “Open”

 

 

When you connect for the first time, PuTTY will raise a security alert in an overlay window. Confirm the authenticity of the server that you try to connect to by clicking “Accept”.

 

 

Next, specify your SHARK user name, confirm with enter. Then, PuTTY will ask for your SHARK user password. Type it in and confirm with enter.

For novice users:

When you type in your password, you will not see any characters appearing. It will seem as if the line is blank and you have typed nothing in. However, this is not the case. You will have typed in the password.

 

 

Once logged in, the command line prompt will show your SHARK username and the name of the server.

You can logout by typing the command logout.

By clicking on the PuTTY symbol, you can access to additional functions of PuTTY.

 

 

When you want to connect the next time, you can click on the name of the session in the list of “Saved Sessions”, click on the button “Load” and then on the button “Open”.

Connecting with PuTTY using an ssh gateway

 

ALICE

SHARK

 

ALICE

SHARK

After you have started PuTTY, go first to the category “Connection” and set “Second between keepalives” to 60. Otherwise the connection will automatically terminated after a few minutes.

Then switch back to the category “Session”

This has to be done for every connection that you want to set up.

After you have started PuTTY, go first to the category “Connection” and set “Second between keepalives” to 60. Otherwise the connection will automatically terminated after a few minutes.

Then switch back to the category “Session”

This has to be done for every connection that you want to set up.

 

Set “Host Name” to ssh-gw.alice.universiteitleiden.nl.

Save the session in “Saved Session” with the name “alice_gw” and click the button “Save”

Set “Host Name” to res-ssh-alg01.researchlumc.nl.

Save the session in “Saved Session” with the name “shark_gw” and click the button “Save”

 

Click on the category “Tunnel” and set a source port and destination for each login node,i.e.,

  • Source port: 2221

  • Destination: 132.229.104.228:22

  • Click Add

  • Source port: 2222

  • Destination: 132.229.104.229:22

  • Click Add

Then, go back to the category “Session” and make sure to save the new settings for session “alice_gw”.

 

Click on the category “Tunnel” and set a source port and destination for each login node,i.e.,

  • Source port: 2223

  • Destination: 145.88.76.217:22

  • Click Add

  • Source port: 2224

  • Destination: 145.88.76.219:22

  • Click Add

Then, go back to the category “Session” and make sure to save the new settings for session “shark_gw”.

 

In order to connect to the login nodes, we need to setup a second session:

  • Load the “Default Settings”

  • Repeat the first step of setting “Second between keepalives” in the category “Connection”

  • Set “Host Name” to localhost or 127.0.0.1

  • And the port to 2221 or 2222 depending on the login node that you want this session to connect to

  • Save the settings for this session for example with the name “alice1” or “alice2”

Connecting to ALICE is a two step process.

In order to connect to the login nodes, we need to setup a second session:

  • Load the “Default Settings”

  • Repeat the first step of setting “Second between keepalives” in the category “Connection”

  • Set “Host Name” to localhost or 127.0.0.1

  • And the port to 2223 or 2224 depending on the login node that you want this session to connect to

  • Save the settings for this session for example with the name “shark1” or “shark2”

Connecting to SHARK is a two step process.

 

First, load the session “alice_gw” by clicking on the corresponding name in the list followed byclicking on the button “Load” and the button “Open”.

When you connect for the first time, PuTTY will raise a security alert in an overlay window. Confirm the authenticity of the server that you try to connect to by clicking “Accept”.

 

 

Next, specify your ALICE user name, confirm with enter. Then, PuTTY will ask for your ALICE user password. Type it in and confirm with enter.

For novice users:

When you type in your password, you will not see any characters appearing. It will seem as if the line is blank and you have typed nothing in. However, this is not the case. You will have typed in the password.

Next, specify your SHARK user name, confirm with enter. Then, PuTTY will ask for your SHARK user password. Type it in and confirm with enter.

For novice users:

When you type in your password, you will not see any characters appearing. It will seem as if the line is blank and you have typed nothing in. However, this is not the case. You will have typed in the password.

 

When successful, you should be logged in to the gateway.

Keep this session open, but do not do anything further with it.

When successful, you should be logged in to the gateway.

Keep this session open, but do not do anything further with it.

 

Open a second session to a login node, by loading the settings for “alice1” or “alice2”.

When you connect for the first time, PuTTY will raise a security alert in an overlay window. Confirm the authenticity of the server that you try to connect to by clicking “Accept”.

Open a second session to a login node, by loading the settings for “alice1” or “alice2”.

When you connect for the first time, PuTTY will raise a security alert in an overlay window. Confirm the authenticity of the server that you try to connect to by clicking “Accept”.

 

Next, specify your ALICE user name, confirm with enter. Then, PuTTY will ask for your ALICE user password. Type it in and confirm with enter.

Next, specify your SHARK user name, confirm with enter. Then, PuTTY will ask for your SHARK user password. Type it in and confirm with enter.

 

Now, you should be connect to one of the login nodes on ALICE.

Now, you should be connect to one of the login nodes on SHARK.

For logging out, best to type logout in the session for the login node, followed by logout in the session for the gateway.

X2Go

With X2Go, you can get a remote desktop on ALICE. Instructions on how to set X2Go up, can be found here: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37748998