By default the ssh-agent service is disabled. Configure it to start automatically.
Get-Service ssh-agent | Set-Service -StartupType Automatic
To start the ssh-agent service:
Start-Service ssh-agent
To stop the ssh-agent service:
Stop-Service ssh-agent
To check if the ssh-agent is running:
Get-Service ssh-agent
To add keys to ssh-agent:
ssh-add $env:USERPROFILE\.ssh\id_ed25519
To remove keys from ssh-agent:
If ssh-add -d
has been run without arguments, the keys for the default identities will be removed. Otherwise, the argument list will be interpreted as a list of paths to public key files and matching keys will be removed from the agent.
ssh-add -d IdentityFile
To remove all identities from ssh-agent:
ssh-add -D
Configure git to use windows SSH
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe