How do I create an SSH key pair in nanoHUB?

To create an SSH key pair:

  1. Open a nanoHUB Jupyter terminal.
  2. Change the working directory to the .ssh (hidden) directory:
    cd .ssh
  3. List the files in the directory:
  4. If there is already a file named “id_rsa.pub”, then an SSH key pair has already been set up.  The contents of this file are your public SSH key.
  5. If there is no file named "id_rsa.pub" (or if you want to create a new .ssh key), enter the following on the command line while working in the .ssh directory:
    1. ssh-keygen -t rsa -b 4096 -C "Used with user name’s nanoHUB account"
    2. You can update the comment within the quotes as you like.
    3. When prompted for the directory, press Enter to use the default .ssh directory
    4. When prompted for a passphrase, you can press Enter to bypass using a passphrase.  It is acceptable to not use a passphrase, and the key is still pretty safe.
    5. Two files will be generated:
      1. .ssh/id_rsa
      2. .ssh/id_rsa.pub
    6. You will also see a “key fingerprint” and a “random art image”.  You do not need to do anything with these.
  6. Copy the contents of the id_rsa.pub file to paste elsewhere (for example, in your private GitHub repository.)

0 Dislike

Last updated

Comments on this entry

There are no comments on this entry.

Post a comment

Post a comment

Comments are closed on this entry.

Please keep comments relevant to this entry. Comments deemed offensive or inappropriate may be removed.