In this tutorial, you will go through the user sign-up process for a PSTAT user account for server access. This will require you to generate a SSH key for your machine.

If you run into any issues, please ask for help in the PSTAT Research Computing Users Google Group!

Prereqs

Useful Links

Google Docs Version of Tutorial

These steps are for Windows machines only.

  1. Press Start and search for "Windows Powershell". Click on it to open a new shell.
  2. Next, run the following code to create a directory called .ssh.
new-item $HOME\.ssh -ItemType Directory
  1. In the terminal either type or copy-paste the following command:
ssh-keygen -t ed25519 -f $HOME\.ssh\ed25519

You will be prompted to add a password to this key... Use something that is secure and memorable (or ideally something you can store in your password manager)! The command above will generate 2 files in the directory C:\Users\<your username>\.ssh\: ed25519 (private key) and ed25519.pub (public key).

  1. Verify that ssh-agent is running by searching for "Services" in the Start Menu:

  1. Search for "OpenSSH Agent" and make sure that the Status is "Running" and Startup Type is "Automatic".

  1. If this is not the case, right-click on the "OpenSSH Authentication Agent" entry -> select "Properties" -> Under "Service Status" select "Start" -> From the "Startup Type" drop down menu, select "Automatic".

  1. Lastly, verify that your private key is added to your ssh-agent keyring by typing the following command in terminal where <KEY_NAME> is the name of the key you created earlier. Enter the password that you created earlier!:
ssh-add $HOME\.ssh\ed25519

These steps are for macOS/Linux machines only.

  1. Find your terminal application and open up a new shell:
  1. In the terminal either type or copy-paste the following command:
ssh-keygen -t ed25519 -f ~/.ssh/ed25519

You will be prompted to add a password to this key... Use something that is secure and memorable (or ideally something you can store in your password manager)! The command above will generate 2 files in the directory ~/.ssh/: ed25519 (private key) and ed25519.pub (public key).

  1. Verify that your ssh-agent is running by using the following command:
eval "$(ssh-agent -s)"
  1. Lastly, verify that your private key is added to your ssh-agent keyring by typing the following command in the terminal where ed25519 is the name of the private key you created earlier. Enter the password that you created earlier!:
ssh-add ~/.ssh/ed25519

Once you have generated your keys, you should upload them onto Google Drive. This way, you can add new devices or update device access if you ever lose access to your original keys stored on this laptop/desktop.

  1. Create a folder on your Google Drive. You can name it whatever you wish, in this case I named mine "SSH":

  1. Enter the folder and hit the "+ New" button on the left handside of your screen and select "File Upload":

  1. Go to your "Home" directory. For Windows users this should be the location C:\Users\your_user_name\ and for Linux/Mac users it will be /home/your_user_name/. You may need to select a "Show Hidden Files" option regardless of your operating system in order to use the .ssh folder!

  1. Go inside the ".ssh" directory. Select the ed25519 and ed25519.pub files and upload them:

Now that you have your public and private keys, complete the following user sign-up form. In the last step where you're asked to input your public key, do the following (this step uses your installation of VS Code):

  1. Go back to your terminal and use the following command:

Windows:

code $HOME\.ssh\ed25519.pub

macOS/Linux:

code ~/.ssh/ed25519.pub
  1. This will launch a VS Code window containing your public key. Copy and Paste the key into the last step of the Alta user sign-up form.
  1. Once you've completed the form, please send a message in the PSTAT Research Computing Users group to confirm your completion!