GIT OpenSSH Config Windows/WSL2 with KeepassXC and VS Code

We use Windows OpenSSH to connect to the ssh server instead of Putty

Activate the OpenSSH Client in Windows

#Test if the ssh-agent is installed
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'

# Install the OpenSSH Client if not installed
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

# Check if service is running
Get-Service ssh-agent

# Configure service if not running
Get-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service

# After a key is loaded from KeepassXC it should be listed
ssh-add -l

# Configure git to use OpenSSH 
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe

# To get VS Code running use git once per git source from commmand line to add the host key
git pull

References

Git und SSH-Key mit Passphrase unter Windows | dev-community.de
How to use KeepassXC to serve SSH keys to WSL2 and Ubuntu – Mendhak / Code
OpenSSH installieren | Microsoft Docs