Connecting to a remote server#
Your local computer is often not capable of doing the large amount of computations that is involved in 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 (SSH). The ssh structure usually is <yourETH-ID>@<server-address>.
Note that your ETH-ID is your username used for login to the ETH mail account and < and > are not part of the command.
In case of Euler the server address is 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 (the same password used to login to your ETH mail account).
Please note that no characters (also no asterisks) 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.
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
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 with <yourETH-ID>@<server-address>. Instead of the server address of Euler, you need to use the server address of Cousteau which is 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.
Click on the image below to see how connecting and disconnecting to the servers will change your current location on the command line.
Exercise 0.4#
Exercise 0.4
Open the file explorer on your local computer and try to navigate to your default directory on the command line interface.
Check the GIF above for an example on Windows of where to find the default directory within your file explorer.
On Windows, your default directory should be C:\Users\<your_username>, thus f.ex. C:\Users\stmelani.
On Mac, your default directory should be /Users/<your_username>, thus f.ex. /Users/stmelani.
Try to connect to Euler yourself
First, you have to open the command line interface on your 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
# Note that your current location changed from the location on your local computer (found on the file explorer)
# Note that your new location is on the server Euler (on the command line, you are not on your local computer anymore)
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
#Note that you are back at your default location on your local computer
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
# Note that your current location changed from the location on your local computer (found on the file explorer)
# Note that your new location is on our lab-internal server (on the command line, you are not on your local computer anymore)