Integrate Windows OpenSSH and VSCode / Git(Bash)

Generate key pair

Don’t forget to add the key to Github.

ssh-keygen -t ed25519 -C "Machine-OS-User"

Start the Windows SSH-Agent

Get-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service

add your SSH keys to the windows agent

ssh-add ~/.ssh/id_ed25519

If you also want git to use ssh.exe, just enter:

git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe

Integrate WSL (Arch)

Install openssh and wsl2-ssh-agent

yay -S openssh wsl2-ssh-agent

Prepare the directory

mkdir ~/.ssh

Start the bridge upon login;
add to ~/.zshrc

eval "$(/usr/sbin/wsl2-ssh-agent)"

Apply the changes

source ~/.zshrc