====== Login and data transfer ======
This webpage provides guidance on accessing and utilizing the Vienna Scientific Cluster (VSC). Key prerequisites include having a user account set up by the project leader and a phone for OTP authentication. Users must access the university network either on campus or via VPN and use a terminal program like xterm, terminal, or PuTTY. This webpage covers terminal-based SSH login procedures for VSC-4 and VSC-5, including node logins for e.g. troubleshooting. It explains the use of the .bashrc file for customizing terminal sessions and offers detailed instructions on SSH key exchange and tunneling for secure, efficient access. Additionally, it presents various file transfer methods using scp and rsync for efficient data management and alternatives like FileZilla and WinSCP for interactive file transfers. Other login methods to the cluster are also linked here:
* [[doku:iavsc|Interactive Access (!M)]]
* [[doku:jupyterhub|JupyterHub]]
===== Project and User Account =====
==== Prerequisites ====
To gain access to VSC, you need to have
* A user account
* Project leader (re-)sets
* username
* password
* phone number for receiving OTP (One Time Password)
* To access the university network, ensure you are either physically on campus or connected through the university's VPN.
* 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).
===== Connecting to VSC =====
==== Terminal ====
The figure below illustrates the connection from the local machine to the remote VSC login nodes.
{{:doku:connection_visualisation.png?nolink&600|}}
VSC-4 and VSC-5
Login via
# represents your username
# VSX represents the cluster you wish to log in
[...]$ ssh @vscX.vsc.ac.at
assigns you to a clusters login node per round robin manner.
=== Connecting to a specific node ===
VSC-4 has 10 named l40, …, l49.
VSC-5 has 10 named l50, …, l59.
{{:doku:vscnodeconnection1.png?nolink&600|}}
You may have reason to login to a specific login node:
# ln is a placeholder for the actual node e.g. l43
[...]$ ssh @ln.vsc.ac.at
This may be necessary for e.g. trouble shooting:
* Verify Node Availability
* Network Configuration
* Check SSH Configuration
==== Alternative - Putty ====
For an alternative to the standard terminal SSH connection, consider using putty.
{{:doku:puttyvscx.png?nolink&600|}}
First configure the connection like in the image at the top, and when connecting, you only need to type the hostname and not the node address too.
vscX indicates the specific VSC system you wish to connect (either VSC4 or VSC5).
example hostname:
vsc5.vsc.ac.at
As stated before, putty was originally designed for the Windows platform, however, it can also be used on other platforms, you can download it from: https://www.putty.org)
==== .bashrc ====
The `.bashrc` file in your home directory allows you to customize preferences for your Bash shell.
Each time you open a terminal or submit a job to the cluster, the `.bashrc` file is executed. This means that any commands or settings in this file are applied automatically. Updating the `.bashrc` file can help automate tasks every time a terminal session starts.
For example, if you want to set some consistant environment variables every time you open a terminal, you can add them to your `.bashrc` file like this:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# You can add this to set locale settings for compatibility
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# You can add this to run a custom script if it exists
if [ -f ~/.my_custom_script.sh ]; then
. ~/.my_custom_script.sh
fi
# You can add this to set an alias
alias myAlias="my_Command"
Because the usual way of sending configuration variables (like `SendEnv` in SSH) does not work for VSC users, the VSC provides `.bashrc` files for users to manage their settings.
===== SSH-Key based login =====
Issue with Current Login System:
Although the OTP is valid for 12 hours, you still need to enter your password each time you access the VSC due to the absence of a Key Exchange mechanism.
==== SSH Key Exchange ====
Share the Key with the Cluster
{{:doku:folie_08_ssh_keys.png?nolink&600|}}
Using ssh-keys is an option that allows you to open multiple shells on the cluster by entering your passphrase only once.
In order to login to the cluster you use the port 27 (-p 27) instead of the ssh port 22
ssh -p 27 @vsc5.vsc.ac.at
The key -optimally and we really ask you to generate it that way- is protected by a passphrase. **This passphrase should be as secure as possible.**
{{:doku:sshkeys_v03VSCX.png?nolink&600|}}
[[doku:vpn_ssh_access|WIKI-link: ssh-keys]]
==== SSH Key Tunneling ====
{{:doku:folie_09_ssh_keys.png?nolink&600|}}
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.
{{:doku:sshkeys_3servers_v03VSCX.png?nolink&600|}}
[...]$ 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
When prompted to create a passphrase, ensure it is as secure as your password. **Do not generate an unprotected key under any circumstances**
it poses a serious security risk to our system.
[...]$ ssh-copy-id @jumphost.ac.at # copy key to jump host
[...]$ ssh @jumphost.ac.at # ssh into jumphost
[...]$ ssh-copy-id @vscX.vsc.ac.at # copy key from jumphost to remote machine
You will be asked for both a password and OTP (One-Time Password) in the process.
In the ~/.ssh/config file you can configure the jumping route:
Host # the name is used for the input when using ssh
HostName vscX.vsc.ac.at # HostName of the cluster
User # your username
ProxyJump @jumphost.ac.at # the Connection to the Jumphost
Example for ~/.ssh/config:
Host vsc5
HostName vsc5.vsc.ac.at
User myUser
ProxyJump myUser@jumphost.ac.at
connect to Cluster with ssh:
[...]$ ssh vsc5
more about the [[https://www.ssh.com/academy/ssh/agent|ssh agent]]
===== Copy & Sync =====
{{:doku:folie_11_scp_rsyn.png?nolink&600|}}
When using **scp** to copy files, it transfers all specified files or directories from a source to a destination. This approach can be inefficient for large datasets or frequent updates, as scp always copies everything anew. This means lengthy transfer times and potential wastage of storage space, especially if only minor changes have occurred in your data. In contrast, **rsync** offers a more efficient solution: it first compares the source and destination file structures. Then, it selectively copies only the files that have changed, saving both time and disk space.
scp
rsync [OPTIONs]
in order to setup on the remote machine, follow: [[doku:backup|Backup]]
==== Copy — alternative via FileZilla ====
{{:doku:filezillanew2.png?nolink&800|}}
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 and IP address.
==== Copy — alternative via winscp ====
{{:doku:winscpcheck.png?nolink&600|}}