Lab
Lab: Create and Share an Asymmetric Key Pair
Lab: Create and Share an Asymmetric Key Pair
Objective
Create an asymmetric key pair using Warp, find where the key files are stored on your computer, identify the public key and private key, and safely share only the public key.
By the end of this lab, you should be able to explain what you created, where it lives on your computer, which part can be shared, and which part must stay private.
Success Criteria
Your lab is successful when you can:
- Open Warp and generate a new SSH key pair.
- Locate the key files in your computer's
.sshfolder. - Identify the public key file and the private key file.
- Display and copy only the public key.
- Explain why the public key can be shared freely.
- Explain why the private key must stay secret.
- Create a GitHub repository artifact that documents what you did.
- Record a short video demonstration explaining your work in your own words.
Instructions
1. Open Warp
Use Warp as your terminal for this lab.
- On macOS, open Warp from Applications.
- On Windows, open Warp from the Start menu.
If you do not have Warp installed yet, install it from warp.dev.
Warp is the terminal app you will use to type commands. The keys you create are stored on your computer, not inside Warp.
2. Generate a Key Pair
In Warp, run:
ssh-keygen -t ed25519
When prompted for where to save the key, you may accept the default location.
When prompted for a passphrase, follow your instructor's guidance. If no guidance is given, you may press Enter to continue for this classroom lab.
3. Find Your Key Files
List the files in your .ssh folder:
ls ~/.ssh
You should see files similar to:
id_ed25519
id_ed25519.pub
The file ending in .pub is the public key. The file without .pub is the private key.
4. Display Your Public Key
Display only the public key:
cat ~/.ssh/id_ed25519.pub
This is the key you are allowed to share.
5. Do Not Display or Share Your Private Key
Your private key is usually:
~/.ssh/id_ed25519
Do not paste this file into your GitHub repository, your video, a chat message, or the LMS.
6. Create Your GitHub Artifact
Create a GitHub repository for this lab. In the repository, create a Markdown file named:
public-key-lab.md
Include the following:
- The command you used to create the key pair.
- The folder where the key files were created.
- The name of the public key file.
- The name of the private key file.
- Your public key.
- A short explanation of why the public key can be shared.
- A short explanation of why the private key must not be shared.
Do not include your private key.
Required Deliverables
Submit:
- A link to your GitHub repository.
- A short video demonstration.
Your GitHub repository should include your public-key-lab.md artifact.
Your video should show you using Warp and should explain:
- What you created: what an asymmetric key pair is, what command you used, and where the files were created.
- What each key means: which file is public, which file is private, and how you can tell the difference.
- How sharing works: which key is safe to share, why the private key must stay secret, and one real-world situation where public/private keys are useful.
You do not need to read from a script. The goal is to show that you understand what you did well enough to explain it in your own words.
Stretch Challenge: Use Your Public Key With GitHub
For the stretch challenge, add your public SSH key to GitHub and test whether GitHub recognizes your computer.
Stretch Instructions
Copy your public key:
cat ~/.ssh/id_ed25519.pubAdd the public key to your GitHub account under SSH keys.
Test the connection:
ssh -T git@github.comAdd a
Stretch Challengesection to yourpublic-key-lab.mdfile explaining:- What you added to GitHub.
- Why GitHub only needs your public key.
- What the test command showed.
- Why this is safer than sharing a password or private key.
Stretch Deliverable
Add your stretch notes to your GitHub repository and mention the stretch challenge in your video.