Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
pandoc:introduction-to-vsc:02_connecting_to_vsc:connecting_to_vsc [2018/01/31 13:16] pandoc Pandoc Auto-commit |
pandoc:introduction-to-vsc:02_connecting_to_vsc:connecting_to_vsc [2023/03/27 08:22] (current) goldenberg [Connecting to VSC] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
====== Login and data transfer ====== | ====== Login and data transfer ====== | ||
- | * Article written by Irene Reichl (VSC Team) < | + | * Article written by Irene Reichl (VSC Team) < |
+ | ====== Project and User Account ====== | ||
- | ===== Windows ===== | + | {{.: |
- | [[https:// | + | ===== Prerequisites ===== |
- | ===== Mac ===== | + | In order to be able to login VSC you need |
+ | * a user account | ||
+ | * ➠ project leader (re-)sets | ||
+ | * username | ||
+ | * [[https:// | ||
+ | * 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: | ||
- | If, e.g., you have an US keyboard layout, the following lines have to be included in your < | + | |
+ | |||
+ | |||
+ | ====== 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 | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ====== Connecting to VSC ====== | ||
+ | |||
+ | ===== Terminals: ===== | ||
+ | |||
+ | linux: xterm, mac: terminal ## alternative terminal connection < | ||
+ | |||
+ | 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: | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Connecting | ||
+ | |||
+ | {{.:folie_04_ssh_l31.png? | ||
+ | |||
+ | VSC-4 has 10 named l40, …, l49. | ||
+ | |||
+ | VSC-5 has 10 named l50, …, l56. (57 to 59 are currently unavailable) | ||
+ | |||
+ | Login via | ||
<code bash> | <code bash> | ||
- | export LC_CTYPE=en_US.UTF-8 | + | # VSC-4 |
- | export LC_ALL=en_US.UTF-8 | + | [...]$ ssh < |
+ | # VSC-5 | ||
+ | [...]$ ssh < | ||
</ | </ | ||
- | Alternatively, | + | assigns |
- | < | + | 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. |
- | Uncheck | + | **Note:** In the following we use “me” as representative username, please replace that by your own username |
- | ===== Linux and Mac ===== | ||
- | ==== Login ==== | ||
- | Open a terminal window and type (in OSX you open the program called '' | + | ---- |
+ | ====== Connecting to VSC ====== | ||
+ | {{.: | ||
- | < | + | You may have reason to login to a specific login server: |
<code bash> | <code bash> | ||
- | [...]$ ssh <username>@vsc2.vsc.ac.at | + | # VSC-4 |
- | + | [...]$ ssh <me>@l40.vsc.ac.at | |
- | # or login to dedicated server : | + | .. |
- | [...]$ ssh <username>@l21.vsc.ac.at | + | [...]$ ssh < |
+ | # VSC-5 | ||
+ | [...]$ ssh <me>@l50.vsc.ac.at | ||
.. | .. | ||
- | [...]$ ssh <username>@l23.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. | ||
+ | |||
+ | Maybe in your local | ||
<code bash> | <code bash> | ||
- | [...]$ | + | /etc/ssh/ |
+ | </code> | ||
+ | you find a command | ||
- | # or login to dedicated server : | + | <code bash> |
- | [...]$ ssh <username>@l31.vsc.ac.at | + | SendEnv LANG LC_* |
- | .. | + | |
- | [...]$ ssh < | + | |
</ | </ | ||
+ | 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. | ||
- | The address '' | + | <code bash> |
+ | LANG="" | ||
+ | LC_CTYPE=" | ||
+ | LC_ALL= | ||
+ | </code> | ||
+ | That is one point. But even if you do not take your local language settings with you, | ||
+ | < | ||
+ | has no value on VSC, by default. | ||
- | ==== Two factor authentication ==== | + | 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 | ||
+ | </ | ||
- | First, you will be asked to type your password. | + | ---- |
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ====== 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 | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== ssh-keys ====== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | Using ssh-keys is a possible which enables to open several shells on the cluster by using a passphrase only once. | ||
+ | |||
+ | Therefore | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== ssh-keys ====== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== 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, | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== ssh-keys — tunneling ====== | ||
+ | |||
+ | {{.: | ||
<code bash> | <code bash> | ||
- | [...]$ ssh < | + | [...]$ |
- | Password: | + | [...]$ echo $SSH_AGENT_SOCK # check if it is running |
- | sms sent; please enter otp: | + | [...]$ chmod 700 ~./ |
+ | [...]$ 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. | ||
+ | <code bash> | ||
+ | [...]$ ssh-copy-id < | ||
+ | </ | ||
+ | will be asked for password & OTP on VSC-4 | ||
+ | more about the [[https:// | ||
- | ===== Configuration of the ssh login ===== | ||
- | * Omitting the port in '' | ||
- | * Login with ssh-key + otp is only possible at port 27: '' | ||
- | * Currently, the lifetime of the otp is set to 12 hours, ie. every 12 hours a new otp has to be entered. Logins during the first 12 hours after the last successful login with otp do not require an otp. | ||
+ | ---- | ||
+ | ====== Backup Policy ====== | ||
+ | {{.: | ||
- | ===== LOGIN ➠ terminal in Windows ===== | + | for details see [[https:// |
+ | ---- | ||
- | ===== Data transfer ===== | ||
+ | ====== Sync and Copy ====== | ||
+ | {{.: | ||
- | Transfer your program code, data and input files to your home directory: Please use the latest “Intel” MPI-Environment as described in [[https://wiki.vsc.ac.at/ | + | 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 |
- | === copy data to VSC: === | ||
+ | ---- | ||
+ | |||
+ | ====== Sync and Copy ====== | ||
+ | |||
+ | <code bash> | ||
+ | scp < | ||
+ | scp < | ||
+ | scp myfile.c < | ||
+ | </ | ||
<code bash> | <code bash> | ||
- | [...]$ scp <filename> <username>@vsc2.vsc.ac.at:~/ # VSC-2 OR | + | rsync [OPTIONs] <source> <destination> |
- | [...]$ scp < | + | maybe useful: -av, --exclude=/ |
</ | </ | ||
- | ==== continous | + | in order to setup on the remote machine, follow: [[https:// |
- | * reduces amount of data sent over the network | ||
- | * “quick check” algorithm ➠ only changes sent | ||
- | * [[https:// | ||
- | * recursive, copies symlinks, preserves permissions, | ||
+ | ---- | ||
- | ^ NFS and BeeGFS | + | ====== Copy — alternative via FileZilla ====== |
- | | < | + | |
- | | < | + | |
- | disk controller failure < | + | {{.: |
+ | 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. | ||
- | Backup Policy: < | ||
- | Alternatively, | + | ---- |
+ | ====== Copy — alternative via winscp ====== | ||
+ | {{.: | ||
- | {{: | ||
+ | ---- | ||
- | {{: | ||