To enable SSH functionality in Windows 11, follow these steps:
Open Settings: Press Win + I to open the Settings app.
Go to Apps: Navigate to Apps > Optional features.
Add an Optional Feature: Scroll down and click on View features under the "Add an optional feature" section.
Search for OpenSSH: In the search box, type OpenSSH and you should see two options:
OpenSSH Client
OpenSSH Server
Install OpenSSH Client
: Check the box next to OpenSSH Client and click Next, then click Install.
Verify Installation: Open a terminal (Command Prompt or PowerShell) and type:
ssh
You should see the SSH command usage information, indicating that SSH is installed and available.
- Open Powershell and type
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Follow the instructions and save the key to a default location
- Start the SSH Agent: In PowerShell, start the SSH agent:
Start-Service ssh-agent
IF the service cannot be started, open Powershell as admin and type
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
and then start the service again
Start-Service ssh-agent
- Add Your SSH Key to the SSH Agent: Run the following command to add your SSH private key to the SSH agent:
ssh-add $env:USERPROFILE\.ssh\id_rsa
- Add the SSH Key to Your GitHub Account:
Get-Content $env:USERPROFILE\.ssh\id_rsa.pub | clip
Save contents to a new Github SSH key.
- Test the connection
ssh -T [email protected]