Skip to content

SSH

system: win11 in admin powershell

Start Ssh-agent

Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent

Generate Key-pair

ssh-keygen -t ed25519 -C "[email protected]"

in normal powershell

Add Ssh-key-pair into Ssh-agent

ssh-add C:\Users\18317\.ssh\id_ed25519

Copy id_ed25519.pub into github_ssh_setting Set Auth Key Type

cat ~/.ssh/id_ed25519.pub | clip

Test Ssh Connect by Https

ssh -T -p 443 [email protected]

Add Config

add the following text into ~/.ssh/config

Host github.com
    Hostname ssh.github.com
    Port 443
    User git

Test Test Ssh Connect

you may need to enter yes as it's requiring to trust connection to github

ssh -T git@github.com

Generating a new SSH key and adding it to the ssh-agent - GitHub Docs