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 [2017/11/07 12:57] – Pandoc Auto-commit pandoc | pandoc:introduction-to-vsc:02_connecting_to_vsc:connecting_to_vsc [2023/03/27 08:22] (current) – [Connecting to VSC] goldenberg | ||
---|---|---|---|
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) < |
- | ===== Windows ===== | ||
- | [[https:// | + | ====== Project and User Account ====== |
- | ===== Mac ===== | + | {{.: |
- | If, e.g., you have an US keyboard layout, the following lines have to be included | + | ===== Prerequisites ===== |
+ | |||
+ | 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: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== 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 ====== | ||
+ | |||
+ | ===== 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 ====== | ||
- | < | + | {{.: |
- | <code bash> | + | You may have reason to login to a specific login server: |
- | [...]$ ssh < | + | |
- | # or login to dedicated server : | + | <code bash> |
- | [...]$ ssh <username>@l21.vsc.ac.at | + | # VSC-4 |
+ | [...]$ ssh < | ||
+ | .. | ||
+ | [...]$ 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. | ||
- | ===== Configuration of the ssh login ===== | + | <code bash> |
+ | [...]$ | ||
+ | </ | ||
+ | will be asked for password & OTP on VSC-4 | ||
- | * Omitting | + | more about the [[https:// |
- | * 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. | + | |
- | ===== LOGIN ➠ terminal in Windows ===== | ||
+ | ---- | ||
- | ===== Data transfer | + | ====== Backup Policy ====== |
+ | {{.: | ||
- | 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/doku.php? | + | for details see [[https://service.vsc.ac.at/slides/ |
- | === copy data to VSC: === | + | ---- |
+ | |||
+ | |||
+ | ====== 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/ | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Sync and Copy ====== | ||
<code bash> | <code bash> | ||
- | [...]$ | + | scp <source> <destination> |
- | [...]$ scp <filename> | + | scp <me>@vsc4.vsc.ac.at: |
+ | scp myfile.c | ||
</ | </ | ||
- | ==== continous | + | <code bash> |
+ | rsync [OPTIONs] < | ||
+ | maybe useful: -av, --exclude=/ | ||
+ | </ | ||
+ | in order to setup on the remote machine, follow: [[https:// | ||
+ | |||
+ | |||
+ | ---- | ||
- | * reduces amount of data sent over the network | + | ====== Copy — alternative via FileZilla ====== |
- | * "quick check" algorithm ➠ only changes sent | + | |
- | * [[https:// | + | |
- | * recursive, copies symlinks, preserves permissions, | + | |
+ | {{.: | ||
- | ^ NFS and BeeGFS | + | 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 |
- | | < | + | |
- | | < | + | |
- | disk controller failure < | ||
- | Backup Policy: < | + | ---- |
+ | ====== Copy — alternative via winscp ====== | ||
- | Alternatively, | + | {{.:winscp.png?0x600|winscp}} |
- | {{pandoc: | + | ---- |
- | {{pandoc: | ||