• Article written by Irene Reichl (VSC Team)
(last update 2020-10-10 by ir).

# Project and User Account

In order to be able to login VSC you need

• a user account
• phone number for receiving OTP
• to be inside university network either:
• physically
• or via VPN-connection to your university
• to use a terminal program, e.g. xterm (LINUX), terminal (OSX), putty (originally designed for the Windows platform, however, can also be used on other platforms: https://www.putty.org), …

# Project and User Account

Let us have a look at the first part, in the figure above denoted by a green box: connecting from the local machine to the remote VSC login nodes.

# Connecting to VSC

linux: xterm, mac: terminal ## alternative terminal connection  PuTTY

As stated before, putty was originally designed for the Windows platform, however, can also be used on other platforms, you can download it from: https://www.putty.org)

# Connecting to VSC

VSC-3 has 5 login servers named l31, …, l35. (only for data retrieval)

VSC-4 has 10 named l40, …, l49.

VSC-5 has 10 named l50, …, l56. (57 to 59 are currently unavailable)

# VSC-4
[...]$ssh <me>@vsc4.vsc.ac.at # VSC-5 [...]$ ssh <me>@vsc5.vsc.ac.at

assigns you to a VSC-4 oder VSC-5 login node per round robin manner.

In PuTTY you first configure the connection like in the image at the top, and when connecting, you only need to type the username and not the server address too.

# Connecting to VSC

# VSC-4
[...]$ssh <me>@l40.vsc.ac.at .. [...]$ ssh <me>@l49.vsc.ac.at
# VSC-5
[...]$ssh <me>@l50.vsc.ac.at .. [...]$ ssh <me>@l56.vsc.ac.at

This may be necessary for trouble shooting.

# .bashrc

With the .bashrc file in your home directory you are able to set your preferences for your bash shell. On VSC we provide a recommended .bashrc file that you may use if you like.

For some libraries on VSC it is important that you have set the language settings properly. A locale is a set of environmental variables that defines the character encoding, language, time/date format, numbers, … for your system libraries and locale-aware applications on a Linux system.

/etc/ssh/ssh_config

you find a command

SendEnv LANG LC_*

which means that in ssh connections the local environment is taken to the remote machine. E.g., my local settings are, where some variables are not set as you see.

LANG=""
LC_CTYPE="UTF-8"
LC_ALL=

That is one point. But even if you do not take your local language settings with you,

has no value on VSC,  by default.

Way out:
For certain libraries it is necessary to set these two lines in your .bashrc:
# .bashrc
 {.bash}
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

# again and again

The OTP-key holds for 12h and for the IP you login. However, each time you want to have a new shell on the cluster you will be asked to type the password. Is there a way out?

# ssh-keys

Using ssh-keys is a possible which enables to open several shells on the cluster by using a passphrase only once.

Therefore you generate a key on your local machine which you copy to the remote machine. In order to login you use port 27 instead of the default ssh port 22. The key -optimally and we reaallay ask you to generate it that way- is protected by a passphrase. This passphrase should be as secure as possible.

# ssh-keys — tunneling

You may want to jump (tunnel) over a host which is between your local machine and VSC. Then you need to copy your key to both machines, the jump host and VSC.

# ssh-keys — tunneling

[...]$eval ssh-agent # start ssh agent [...]$ echo $SSH_AGENT_SOCK # check if it is running [...]$ chmod 700 ~./ssh     # change rights of .ssh-directioy
[...]$ssh-keygen -t rsa # generate key on local machine will be asked to create a pass phrase. that passphrase must be as secure as your password. IT IS POSSIBLE AT THAT POINT TO GIVE NO PASSWORD, BUT NEVER EVER GENERATE A KEY WHICH IS NOT PROTECTED !!! This may be a hazard for our system. [...]$ ssh-copy-id <me>@vsc4.vsc.ac.at # copy key to remote machine

# Backup Policy

for details see Storage

# Sync and Copy

If you copy with scp you always copy everything. On one hand, it may take ages until everything is copied, on the other hand, you may waste storage if there had only been minor modifications in your data. For that reason you may use rsync which first compares source and destination directory/file structure, subsequently only copying what did actually change. This saves time and disc space.

# Sync and Copy

scp <source> <destination>
scp <me>@vsc4.vsc.ac.at:~/<myfile.c> .
scp myfile.c <me>@vsc4.vsc.ac.at:~/
rsync [OPTIONs] <source> <destination>
maybe useful: -av, --exclude=/daten/temp/...`

in order to setup on the remote machine, follow: WIKI-link:rsync on remote machines

# Copy — alternative via FileZilla

For using FileZilla, make sure that you choose “interactive login”. This is necessary to be able to login via two factor authentication. If you are already logged into the cluster via, e.g., PuTTY or another terminal program, you can also login via a normal session because the OTP is only asked once in 12h per cluster (VSC-3 or VSC-4) and IP address.

# Copy — alternative via winscp

• pandoc/introduction-to-vsc/02_connecting_to_vsc/connecting_to_vsc.txt