Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
student:utilities:start:keypairs:beginner [2024/10/09 11:15] – [Getting Started with Authentication via Key-Pairs] stewarmcstudent:utilities:start:keypairs:beginner [2025/10/29 16:21] (current) – [Configure your computer's ssh client] stewarmc
Line 53: Line 53:
     AddKeysToAgent yes # https://man.openbsd.org/ssh_config#AddKeysToAgent     AddKeysToAgent yes # https://man.openbsd.org/ssh_config#AddKeysToAgent
     # IdentitiesOnly yes # I am thinking maybe I should not propose this for beginners. so it's commented out now.     # IdentitiesOnly yes # I am thinking maybe I should not propose this for beginners. so it's commented out now.
-  Host stu # by specifying the host here as "stu", you can use "stu" as a shorthand for +  Host stu  # by specifying the host here as "stu", you can use "stu" as a shorthand for 
-                   # the full hostname when connecting via ssh to the server at the HostName below+            # the full hostname when connecting via ssh to the server at the HostName below
     HostName stu.cs.jmu.edu     HostName stu.cs.jmu.edu
-    # next setting only necessary if you aren't using a default-named key like id_rsa or id_ed25519 +            # next setting only necessary if you aren't using a default-named key like id_rsa or id_ed25519 
-          # IdentityFile ~/.ssh/name-of_non_default_private_key+            # IdentityFile ~/.ssh/name-of_non_default_private_key
     User YOUR_EID_BUT_DONT_CAPITALIZE_IT # if you specify a user, you don't have to put the     User YOUR_EID_BUT_DONT_CAPITALIZE_IT # if you specify a user, you don't have to put the
-              # user@ when connecting via ssh+            # user@ when connecting via ssh
  
 ** NOTICE THE PART YOU HAVE TO REPLACE ABOVE, FOR MOST IT'S IN JUST THE LAST LINE WHERE IT SAYS "YOUR_EID" ** ** NOTICE THE PART YOU HAVE TO REPLACE ABOVE, FOR MOST IT'S IN JUST THE LAST LINE WHERE IT SAYS "YOUR_EID" **
Line 65: Line 65:
 ==== Tell stu this is all legit ==== ==== Tell stu this is all legit ====
  
-  - in your terminal (see prerequisite above for help opening the correct terminal for our purposes on your OS), enter ''%%ssh-copy-id stu%%''+  - in your terminal (see [[#prerequisites|prerequisite above for help opening the correct terminal for our purposes on your OS]]), enter ''%%ssh-copy-id stu%%''
     - you may see a message like ''%%The authenticity of host 'stu.cs.jmu.edu (134.126.141.221)' can't be established.     - you may see a message like ''%%The authenticity of host 'stu.cs.jmu.edu (134.126.141.221)' can't be established.
 ED25519 key fingerprint is SHA256:RYxaUOHGdifpo+JaJeE6JHWVqiji+in1GI5lvbJluPk. ED25519 key fingerprint is SHA256:RYxaUOHGdifpo+JaJeE6JHWVqiji+in1GI5lvbJluPk.
Line 76: Line 76:
  
 ==== Tell Github to join the party ==== ==== Tell Github to join the party ====
 +
 +**Note: For those who skipped here because of 261 reasons -  Open a terminal window (specifically as specified [[#prerequisites|above in the prerequisites]]).**
  
 If you want to do things with GitHub, you must first have an account. If you don't have one yet, [[https://github.com/signup|sign up for a GitHub account]]. If you want to do things with GitHub, you must first have an account. If you don't have one yet, [[https://github.com/signup|sign up for a GitHub account]].
  
-**Note:** it's possible that your quippy username that's served you well since middle school through that very public social media posting about that awkward thing that happened back in high school might be ok to keep around, but perhaps not as your personal-professional username. So maybe don't doxx yourself by making your github username relate to all your prior online activity. 😅+**Note:** it's possible that your quippy username that's served you well since middle school through that very public social media posting about that awkward thing that happened back in high school might be ok to keep around, but perhaps not as your personal-professional username. So maybe don'[[https://en.wikipedia.org/wiki/Doxing|doxx]] yourself by making your github username relate to all your prior online activity. 😅
  
   - Go to [[https://github.com/settings/ssh/new|Your GitHub SSH and GPG keys settings > New SSH Key page]].   - Go to [[https://github.com/settings/ssh/new|Your GitHub SSH and GPG keys settings > New SSH Key page]].
Line 86: Line 88:
     * I suggest naming it based on the current computer you are using (try to be imaginative here. Imagine that this is but the first of many of ThatBrand™️ LapFlaps®️ that you will own in your long, laudable career). Consider something like, ''%%ThatDellWithThatOSv42%%''.     * I suggest naming it based on the current computer you are using (try to be imaginative here. Imagine that this is but the first of many of ThatBrand™️ LapFlaps®️ that you will own in your long, laudable career). Consider something like, ''%%ThatDellWithThatOSv42%%''.
   - leave the browser there for a sec, and go back to your terminal and show your PUBLIC key to yourself by entering ''%%cat ~/.ssh/id_ed25519.pub%%''   - leave the browser there for a sec, and go back to your terminal and show your PUBLIC key to yourself by entering ''%%cat ~/.ssh/id_ed25519.pub%%''
-    * copy the output of that command.+    * copy ALL of the output (not just the key string of numbers and letters) of that command.
   - go back to the browser and paste your PUBLIC key's contents into the "Key" field.   - go back to the browser and paste your PUBLIC key's contents into the "Key" field.
   - click "Add SSH key".   - click "Add SSH key".
   - test that all is well by entering ''%%ssh -T git@github.com%%''   - test that all is well by entering ''%%ssh -T git@github.com%%''
 +    * you may get a message like this when first connecting to GitHub(It's okay to say yes to this):
 +  The authenticity of host 'github.com (140.82.114.4)' can't be established.
 +  ED25519 key fingerprint is SHA256:+DiY3wvvxxxfxfffF/zLDA0zPMSvHdkr4UvCOqU.
 +  This key is not known by any other names.
 +  Are you sure you want to continue connecting (yes/no/[fingerprint])? 
 +
     * you should see a message like ''%%Hi hcientist! You've successfully authenticated, but GitHub does not provide shell access.%%''     * you should see a message like ''%%Hi hcientist! You've successfully authenticated, but GitHub does not provide shell access.%%''