Questions? Feedback? powered by Olark live chat software
Resources Home

Connecting To Your Cluster

When you submit a job to the Rescale platform, an HPC cluster is provisioned according to your job's hardware settings. You can interact with this cluster on Rescale in two main ways:

  • by the browser interface of the Rescale platform
  • by logging on to the cluster using SSH

This article describes how to use SSH to login to your cluster.

Configuring your Job Settings

Specify your SSH key from the Job settings interface by:

  • clicking on the User button at the top right of the Rescale platform while logged in to your account
  • selecting Settings in the drop-down menu
  • clicking on Job

You will then see the page shown below.

AccessJobSettings.png

Set your SSH Public Key

SSH keys are a way to identify trusted computers, without involving passwords. You can use an existing public/private keypair or create a new one on your local computer using the instructions below.

Generating your SSH Key in Windows

You can use PuTTYgen to generate your Rescale SSH key. PuTTY is a free open-source terminal emulator that functions much like the Terminal application in Mac OSX in a Windows environment. You can download PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/. The PuTTYgen utility comes with the PuTTY client installation.

Generating an SSH Key

To generate an SSH key with PuTTYgen, follow these steps:

  • Open the PuTTYgen program.
  • For Type of key to generate, select SSH-2 RSA.
  • Click the Generate button.
  • Move your mouse in the area below the progress bar to provide randomness for the key generation algorithm. When the progress bar is full, PuTTYgen has generated your key pair.

putty-generate-key.png

  • Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase if you wish.
  • Click the Save private key button to save the private key. You must save the private key as you will need it to connect to your machine.

putty-copy-key.png

Copy the Public Key to the Clipboard

  • Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All.
  • Right-click again in the same text field and choose Copy.

Generating your SSH Key in Linux or Mac OSX

On Mac OSX and Linux, SSH key generation utilities can be run from the command line of a terminal. To open the Mac OSX Terminal, open the Finder and choose Utilities from the Go menu. Find the Terminal application in the Utilities window and double-click it. The Terminal window opens with the command line prompt displaying the name of your machine and your username.

First check for existing keys on your computer. From the command line of the terminal type:

$ ls -al ~/.ssh

This lists the files in your .ssh directory, however, if you have a new Mac OSX or Linux installation, the .ssh directory may not yet exist.

The default public key file names are:

  • id_dsa.pub
  • id_ecdsa.pub
  • id_ed25519.pub
  • id_rsa.pub

If you wish to use an existing key file for your Rescale account, you can omit the next step.

Generate a new SSH key

By default, keys for all identities are added to the directory:

  • /Users/_yourname_/.ssh on Mac OSX
  • /home/_yourname_/.ssh on Linux

If you have an existing identity (public/private key pair) in this directory that you want to use on Rescale, skip this step. To create a new default identity:

  1. Open a terminal session on your local system.
  2. Enter ssh-keygen at the command line.
  3. The command prompts you for a file to save the key in. If the .ssh directory doesn't exist, the system creates one for you.
  4. Accept the default location.
  5. Enter and re-enter a passphrase, if desired, when prompted.

The ssh-keygen command creates your default identity with its public and private keys. The whole interaction will look like this:

[mairi@centos ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mairi/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/mairi/.ssh/id_rsa.
Your public key has been saved in /home/mairi/.ssh/id_rsa.pub.
The key fingerprint is:
ed:88:95:91:38:e4:5e:ff:d6:73:70:f7:43:3e:f6:3b mairi@centos
The key's randomart image is:
+--[ RSA 2048]----+
|      .          |
|     o . .       |
|      + +        |
|     . o =       |
|      . S o   ..o|
|       o o . .ooo|
|      . . . o o=o|
|           .  .E+|
|               .+|
+-----------------+

You can, of course, save your new key pair to an alternative, i.e. non-default, location in your file system if you wish. By default, ssh-keygen generates 2048-bit RSA keys.

Copy the contents of your public key

On Linux, copy the contents of your chosen public key file by opening it in a text editor or by running the cat command (in this case the public key is stored in the id_rsa.pub file):

$ cat ~/.ssh/id_rsa.pub

On Mac OSX, you can use the command pbcopy in the terminal to copy the contents of your public key file to the clipboard as follows:

$ pbcopy < ~/.ssh/id_rsa.pub

Having copied the contents of your public key on your clipboard, paste the contents of the public key into the SSH Public Key field of the Job settings page.

Restrict Access

The Access Restriction (CIDR) field allows you to restrict which IP addresses can access your cluster. The options Everywhere or My Current IP Address can be set automatically from the pull-down menu. You can also specify your own custom Classless Inter-Domain Routing (CIDR) rule by editing the Access Restriction (CIDR) text field directly.

Disable Automatic Termination of Clusters

The default behavior of HPC clusters launched by Rescale is as follows:

  • The nodes specified in your Hardware Settings are launched as a cluster
  • The script or command you specify in the Software Settings page is executed
  • On completion of processes launched by this script, slave nodes are shut down
  • Files created during the course of the run are uploaded for storage
  • The master node is shutdown when file upload is completed

If you uncheck the Terminate Clusters Automatically check-box on the Job settings page the master node will remain active after your original script and any associated file uploads have completed. You do not have to disable this check-box to SSH in to your cluster. If the box remains checked, any open SSH sessions will terminate abruptly with an operating system shutdown message when your Command script completes.

Users disabling this option are responsible for terminating their clusters manually, and Rescale is not responsible for charges that accrue as a result.

Logging Into a Running Cluster

In order to log in to your cluster, you must configure an SSH key in your Job settings prior to submitting your job. When the job is launched the Job Logs window on the Status tab will display the username and IP address of the head node for this cluster, as shown below.

job-logs.png

Using the credentials from the Job Logs, along with the previously specified private key, users can login into the remote cluster directly. Instructions for connecting to your cluster through SSH are given below.

Connecting to Your Cluster from Windows

In Windows, you can use PuTTY as an SSH client to connect to your cluster on Rescale.

When you provision a cluster, the Job Logs window on the Status tab will display a message showing the job's username on the system and the public IP address of the master node of the cluster. The message will look like this:

Instance ready for ssh access. Command: ssh -i </path/to/key> uprod_Fotxeb@52.23.201.205;
working directory: /enc/uprod_Fotxeb/work

In this example, the job username is uprod_Fotxeb and the public IP address is 52.23.201.205. You will need this information when using PuTTY. To log in to your machine, follow these instructions:

  • Open the PuTTY program.
  • Type the public IP address of your provisioned machine in the Host Name (or IP address) field.
  • In the Category panel on the left, expand the SSH section to expose the authentication (Auth) settings.

putty-config-connect.png

  • Click Auth to display settings controlling SSH authentication.
  • Click Browse under Private key file for authentication and select the private key file you created previously.
  • Click Open to start a PuTTY terminal session.

putty-config-auth.png

When you connect to your machine, you may see a PuTTY Security Alert warning you that the host's key is not cached in the the registry. This is normal because PuTTY has never connected to this machine before. Click yes to continue.

Follow these steps to log in:

  • At the login as: prompt, type your username, for instance uprod_Fotxeb and press Enter.

    login as: uprod_Fotxeb
    Authenticating with public key "rsa-key-1234"
    Passphrase for key "rsa-key-1234":
    
  • Type the passphrase you chose for this key, if any, and press Enter.

You should now be logged into your machine.

Connecting to Your Cluster from Linux or Mac OSX

In Mac OSX and Linux, you can use the terminal to log into your machine.

When you provision a cluster, the Job Logs window on the Status tab will display a message showing the job's username on the system and the public IP address of the master node of the cluster. The message will look like this:

Instance ready for ssh access. Command: ssh -i </path/to/key> uprod_Fotxeb@52.23.201.205;
working directory: /enc/uprod_Fotxeb/work

In this example, the job username is uprod_Fotxeb and the public IP address is 52.23.201.205. You will need this information to log in to the cluster.

  • To log in to the cluster from a Terminal window, call ssh using a command of the form:

    $ ssh -i ~/.ssh/<private key file> uprod_Fotxeb@52.23.201.205
    
  • If your placed your Rescale key file is in an alternative directory, substitute the correct file path after the -i flag.

  • The ssh command will log you in to your machine as the job user. If you defined a passphrase for your SSH key, the operating system will prompt you for it.
  • Type in your passphrase (if you have set one) and press Enter.

The terminal prompt should now show that you have logged in as the job user.

Last Updated: Jan 21, 2016 01:19PM PST

Powered by Desk.com
c63bcf49f4eed122cd69ef16269a7198@rescale.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete