Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. To generate a key, on your local command line enter the following

    Code Block
    ssh-keygen -t rsa -b 4096
  2. ssh-keygen will then prompt you to protect your private key with a passphrase. You may create one or leave it blank.

Code Block
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mobaxterm/.ssh/id_rsa):
Created directory '/home/mobaxterm/.ssh'.
Enter passphrase (empty for no passphrase):
.
.
.
  1. Add the public key to the cluster (adjust path to id_rsa.pub if needed and enter your netid)

    Code Block
    ssh-copy-id -i ~/.ssh/id_rsa.pub yournetidhere@hpc2.storrs.hpc.uconn.edu 

Warning

If the ssh-copy-id command fails. We have to manually copy the key onto the cluster:

  1. On a local terminal, open the id_rsa.pub file with a text editor (nano, vim, cat).

  2. Copy the content

  3. On the cluster, locate your .ssh directory in your home and create a new file called “authorized_keys”

  4. Paste the contents of id_rsa.pub into the “authorized_keys”

...