CS 354 Autonomous Robotics

Fall 2021

Setting up an SSH key to use with Github (command line)

  1. Generate an SSH key. On the workstation where you want to access github, execute the following command from the $HOME/.ssh directory (which may need to be created) (use your email address (mine is only shown as an example)
    $ ssh-keygen -t ed25519 -C "molloykp@jmu.edu"
  2. Add your SSH key to your Github account. Click on your account icon in Github (far right side after logging into Github), select Settings from the dropdown listbox. Then click on SSH and GPG keys. Click on New SSH key and copy/paste the string that is stored IN from the id_ed25519.pub file
  3. Tell SSH to use the key when accessing Github. Within your $HOME/.ssh directory, create a file named config. Within this file, add the lines shown below:
    Host github.com
        IdentityFile ~/.ssh/id_ed25519