I’ve realized it would be helpful to walk through this quickly since I am setting up a new Windows machine for .NET and C++ development. The GitHub guide I’ve always used recommends Git Bash, but this is totally possible with PowerShell.

1. Check your install

OpenSSH.Client should already be installed and running as a service on your Windows machine. But it’s always nice to check, so run a new PowerShell window as an Administrator and ****drop this command in:

powershell
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Client*'

We are looking for a state of Installed in the output.

Name  : OpenSSH.Client~~~~0.0.1.0
State : Installed

If you see this, yippee! If not, install the Client using this command, restart the Admin terminal, and check again.

powershell
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Note: No need to install OpenSSH.Server. Just the Client since this is purely about connecting to GitHub


2. Key generation

Now it’s back to a regular terminal session and ssh commands like you would normally run. Generate your key pair and walk through the steps:

powershell
ssh-keygen -t ed25519 -C "your_email@example.com"

3. Start the agent and copy your public key

Now that you have your key pair generated, we will need to copy the public key and, if this is a new Windows box, start the ssh-agent service.

Start up ssh-agent

For an Administrator terminal window, first configure ssh-agent to start automatically:

powershell
Get-Service -Name ssh-agent | Set-Service -StartupType Automatic

Then start it up:

powershell
Start-Service ssh-agent

Add your private key

powershell
ssh-add C:\path\to\your\id_ed25519

Copy your public key

You can do this however you like; the convenient way is to add it to your clipboard with this convoluted PowerShell command:

powershell
Get-Content "C:\path\to\your\id_ed25519.pub" | Set-Clipboard

You could also use the type command and manually copy the output. Whatever!

powershell
 type C:\path\to\your\id_ed25519.pub

4. Add to GitHub and check the connection

And now it’s back to SSH business pt. II! Add your key to GitHub, hurry!

  1. Go to GitHub.com → your profile → SettingsSSH and GPG keysNew SSH key.
  2. Give it a descriptive title (e.g., Windows Laptop 2026).
  3. Paste the key (Ctrl+V) into the Key field.
  4. Click Add SSH key.

Now you can test your connection and make some commits!

powershell
ssh -T git@github.com