Connecting to ARCHER2 and transferring data

Overview

Teaching: 20 min
Exercises: 15 min
Questions
  • How can I access ARCHER2 interactively and transfer data?

Objectives
  • Understand how to connect to ARCHER2.

  • Know how to transfer data onto and off of ARCHER2 efficiently.

Connecting using SSH

The ARCHER2 login address is

login.archer2.ac.uk

Access to ARCHER2 is via SSH using both a password and a passphrase-protected SSH key pair.

Passwords and password policy

When you first get an ARCHER2 account, you will get a single-use password from the SAFE which you will be asked to change to a password of your choice. Your chosen password must have the required complexity as specified in the ARCHER2 Password Policy.

The password policy has been chosen to allow users to use both complex, shorter passwords and long, but comparatively simple passwords. For example, passwords in the style of both LA10!£lsty and horsebatterystaple would be supported.

Picking a good password

Which of these passwords would be a good, valid choice according to the ARCHER2 Password Policy?

  1. mypassword
  2. rainbowllamajumping
  3. A!94ufskl$?
  4. horsebatterystaple

Solution

  1. No This would not be accepted or a good choice as it is too short and is made up of obvious words
  2. Yes This would be a good choice as it is long enough and easy to remember
  3. Yes This would be accepted but may be difficult to remember and type (though you could use a password manager to store it)
  4. No While this meets the criteria, it is a well known example from a popular web comic and so would not be accepted

SSH keys

As well as password access, users are required to add the public part of an SSH key pair to access ARCHER2. The public part of the key pair is associated with your account using the SAFE web interface. See the ARCHER2 User and Best Practice Guide for information on how to create SSH key pairs and associate them with your account:

Log in to ARCHER2

Once you have managed to setup your SSH key pair and have retrieved your initial password from SAFE, try to log into ARCHER2 for the first time using the command:

ssh -i /path/to/sshkey username@login.archer2.ac.uk

The first time you login, you will be prompted to change your password. You will need to enter your initial password from SAFE again (this will be referred to as your LDAP password). Once you have entered this, you will be prompted to choose a new password which you must enter twice.

Data transfer services: scp, rsync

ARCHER2 supports a number of different data transfer mechanisms. The one you choose depends on the amount and structure of the data you want to transfer and where you want to transfer the data to. The three main options are:

More information on data transfer mechanisms can be found in the ARCHER2 User and Best Practice Guide:

Data transfer best practice

There is a lot of information available in the ARCHER2 documentation on how to transfer data using the methods above and how to make it efficient in the documentation linked above.

Here are the main points you should consider:

Creating an uncompressed zip archive and verifying the contents

Using the documentation above, find the command you would use to create an uncompressed zip archive file of all data within a directory called large_data_output/. What command would you use to verify that the archive file you have created is not corrupt so you can safely delete the original data?

Solution

You use the zip command to archive the data. The -r option is used to perform the operation recursively on a directory and the -0 option is used to specify the archive should be uncompressed:

auser@login01-nmn:~> zip -0r large_data_output.zip large_data_output/

To verify the archive is valid, you would use the zip command again, this time with the -t option:

auser@login01-nmn:~> zip -t large_data_output.zip

Key Points

  • ARCHER2’s login address is login.archer2.ac.uk.

  • The password policy for ARCHER2 is well documented.

  • There are a number of ways to transfer data to/from ARCHER2.