Setup

General information

Main objective

The aim of this setup is to ensure that you can access the ETH network remotely and to introduce our teaching platform.

Learning objectives

Learning Objective 1 - You grasp the concept of remote servers and networks required to securely connect to them via the internet

  • You use the VPN to access the ETH network from outside

  • You connect to a remote server

Remote servers

Computers have been connected to each other to exchange data since the 1950s and now we take internet access for granted on our mobile devices. Behind the screen, there are countless pieces of software and protocols that make everything work, but we won’t go into the details.

It is important however to understand the concept of a remote server. This is a computer sitting somewhere, possibly in the ETH basement, possibly in an enormous data centre in Iceland, which is only supposed to be connected to over the internet. To be able to connect to a server you need to have appropriate access - a username and password - and perhaps you will have to be connecting from an allowed location.

Networks

Another important concept is the IP address, a numerical label unique for each device that is connected to a computer network. An IP address is used to identify a device and its network interface thereby providing the location of the device in the network. By knowing the IP address of a device, a path to that device can be identified and a connection between two devices within a network can be established.

For instance, you can only access the ETH remote servers from within the ETH domain, either because you are on the ETH WiFi or you have connected via Virtual Private Network (VPN). VPN is a way of connecting to a server that then channels all of your internet traffic through the server as if you were in its location. So if you use the ETH VPN, you will have access to everything as if you were connected to the ETH WiFi or cable network.

If you have not already connected your devices with the ETH VPN you can find the instructions to do so here.

Exercise 0.1

  • Try to find out your IP-address before connecting to the ETH VPN. You can do so by going to the website Hoststar.

  • Now connect to the ETH VPN and check your IP-address once more at Hoststar. What do you notice?

You should notice that your IP-address change even though you did not physically change your location.

Command line interface

Although software exists which allows you to access a server just as if you were logging into a normal computer - with a graphical user interface (GUI) and everything - many will only provide a command line interface. This is a text-based method of communication that almost all computers have, though it is typically hidden out of sight for most users.

The terminal functions like an old fashioned text adventure game, or a voice-activated assistant that requires you to type in your commands.

Accessing the command line interface on your own computer depends on your system:

Windows

  • In the taskbar menu type ‘command’ and Command Prompt should appear for you to launch

  • Alternatively press Windows Key + r and type ‘cmd’ into the box and Command Prompt should launch

Mac

  • Click the launchpad icon in the dock, type ‘Terminal’ into the search field and launch from there

  • Alternatively in the Finder, navigate to /Applications/Utilities folder and launch Terminal from there

Mobaxterm

Frequent users often use a software called Mobaxterm to connect to the command line. If you are interested in using this software instead of your local terminal:

  • Find the free version of Mobaxterm here and either download and execute the Portable edition or install the Installer edition

Connecting to a remote server

Your local computer is often not capable of doing bioinformatic work within a reasonable time. Therefore, in order to do bioinformatics, you have to connect to remote servers which have higher capacities than your local machine. ETH provides to its members access to a server named Euler, which can be accessed at the address: euler.ethz.ch. Bioinformatic labs often have in addition their own remote servers. In order to work on a server, you have to connect to it using a protocol called Secure Shell or ssh. The ssh structure usually is <your-ID>@<server-address> (Note: < and > are not part of the command) in case of Euler this is <yourETH-ID>@euler.ethz.ch, so the command to connect to Euler is:

# Command to connect to euler
ssh <your ETH-ID>@euler.ethz.ch

#Your command could f.ex. look like this
ssh fieldc@euler.ethz.ch

After entering the command to connect to the remote server Euler, enter your password upon request (please note that no characters (even asterixis’s) will appear while you enter your password). If you access Euler for the first time, ETH will send you an additional verification code to your ETH-mail.

Exercise 0.2

  • Try to connect to Euler yourself

First, you have to open the command line interface on you computer For Windows: Type “command” into the taskbar menu For Mac: Click onto the launchpad icon in the dock and type “Terminal” into the search field

Second, connect to Euler with the ssh command. You need your user ID and your nethz password in order to connect to the serve. The command to connect to the Euler is:

ssh <your ETH-ID>@euler.ethz.ch

Disconnecting from a remote server

After you are done with your bioinformatic work on a server, you want to disconnect from the server. You can do this by using the command exit.

# Command to disconnect from server
exit

Exercise 0.3

  • Try to disconnect from Euler yourself

After connecting to Euler with the ssh command, disconnect from Euler with the exit command. The command to disconnect from Euler is:

exit

Connecting to Cousteau

For this course we are going to use a remote server called “Cousteau”. In order to connect to Cousteau you also have to use the ssh command. Instead of the server address of Euler, you need to use the server address of Cousteau: cousteau.ethz.ch.

# Command to connect to cousteau
ssh <your ETH-ID>@cousteau.ethz.ch

After entering the command to connect to the remote server Cousteau, enter your password upon request (please note that no characters (even asterixes) will appear while you enter your password)

Exercise 0.4

  • Try to connect to Cousteau yourself

First, you have to open the command line interface on you computer For Windows: Type “command” into the taskbar menu For Mac: Click onto the launchpad icon in the dock and type “Terminal” into the search field

Second, connect to Cousteau with the ssh command. You need your user ID and your nethz password in order to connect to the serve. The command to connect to the Cousteau is:

ssh <your ETH-ID>@cousteau.ethz.ch

R-Studio and Jupyter

Parts of the course will rely on using R or Python. To make these programming languages easily accessible to you on Cousteau, we created links for R-studio (R) and Jupyter (Python) which you can find down below:

R-Studio: http://cousteau-rstudio.ethz.ch/

Jupyter: http://cousteau-jupyter.ethz.ch/

R-Studio

When you click on the link http://cousteau-rstudio.ethz.ch/ a login page (picture below) should appear. There you can use your ethz-login to enter the web-based R-studio page.

When you first login into the webpage, it should look like picture 1 down below. You should be familiar with this layout from “Statistik II” since it is the same as R-Studio on your computer. In case you have already forgotten what is what, picture 2 gives you an overview.

  • The red frame shows the R console where you can issue commands and results are shown.

  • The blue frame shows the environment, here all your variables are stored.

  • The yellow frame shows your home folder on Cousteau (more on this later) and the files it contains, plots, packages from your session, and it can also show you help information.

If you are wondering where the R script is, you have to open it manually. Click on File -> New File -> R Script (or use the shortcut with key combination Ctrl + Alt + Shift + N) as you can see in picture 3. This should lead you to the 4 panels you know from “Statistik II” (picture 4).

R1 R2 R3 R4

Jupyter

When you click on the link http://cousteau-jupyter.ethz.ch/ a login page (picture below) should appear. There you can use your ethz-login to enter the Jupyter-Hub.

Once you are logged in, Jupyter will launch your server. In the middle (blue frame) you have your launcher. There you can select what specifically you want to launch (a notebook, the console, the terminal, etc.). On the left-hand side you have your file structure from your home folder on Cousteau (orange), the menu bar (yellow) and the options bar (green). The options bar allows you to start a new launcher, to create new folders and to upload files to Cousteau from your local machine.