Connecting to the Cluster
- 1 Setting up SSH Keys
- 2 Request account, and transfer the public key
- 3 Get Confirmation
- 4 Check that everything is working from
- 5 Use a keychain
- 6 Using this Key elsewhere
Setting up SSH Keys
SSH Keys allow for automatic login from one computer to another via ssh. This allows for a more secure connection since the keys can be much longer than any password a human could remember. The following instructions will show you how to setup an SSH keys using ssh-keygen and ssh which should be available on any *nix system you use.
Generate an ssh public key and private key pair in Unix/BSD/Linux/OSX/Cygwin/MinGW
In order to generate a public private key pair the following command needs to be run from the commandline, a terminal, or the console.
This will ask you for a password and then generate two files in the .ssh directory in your home folder: id_rsa and id_rsa.pub. id_rsa is your private key and should not be given to anyone, if someone does get this file they will be able to login to any computers that you use the key to login to. id_rsa.pub is the public key that will be added to the server's .ssh/authorized_keys file to allow you to login. *NOTE: USING A KEY PAIR WITHOUT A PASSWORD IS INSECURE AND SHOULD NOT BE DONE
Generate an ssh public key and private key pair in Windows for PuTTY
- Install PuTTY using the PuTTY installer
- Run PuTTYGen
- Click Generate and wiggle your mouse
- Enter and Confirm a Key Passphrase
- Save your public and private key
*NOTE: USING A KEY PAIR WITHOUT A PASSWORD IS INSECURE AND SHOULD NOT BE DONE
Request account, and transfer the public key
Send an Email to firstname.lastname@example.org, from you university Email, it should contain the following
Subject: CSCI Compute Cluster Request General University Username What project you are working on and who your collaborators are Any specific software requests you have An attachment of your public key as username.pub (username should not be the literal "username" but instead should be your general university username)
Once the account is setup and the we have populated your ~/.ssh/authorized_keys file with your public key we will Email you back letting you know this is done.
Check that everything is working from
In order to verify that everything is working you should try to login to the machine using:
ssh -p 922 <username>@cluster.cs.wwu.edu
ssh -p 922 -i <path_to_privatekey> <username>@cluster.cs.wwu.edu
If you entered a passphase for you key then you will see the following:
Enter passphrase for key '/home/username/.ssh/id_rsa':
Enter the password for your key pair and you should be logged into the server. If you did not enter a passphase for the key pair then you will be logged in automatically. If you are not logged in at this point you probably had a typo in one of the above commands.
PuTTY in Windows
Use a keychain
In order to keep from having to type in your key passphrase see the following article: Using_SSH_Agent
Using this Key elsewhere
Setup a machine to accept your public/private key pair
In order for a machine that you are logging into to verify your login credentials you must append the public key from the previous step (id_rsa.pub) to the ~/.ssh/authorized_keys file. One way to do so is using the following command if you have the capability with a password to access the machine you would like to use your key to access in the future.
cat .ssh/id_rsa.pub | ssh <username>@<server> 'cat >> .ssh/authorized_keys; chmod 600 .ssh/authorized_keys'