Skip to content

Instantly share code, notes, and snippets.

@HristoKolev
Last active January 28, 2025 11:52
Show Gist options
  • Save HristoKolev/4f3f537f4883a3fd20d9cc8f99876187 to your computer and use it in GitHub Desktop.
Save HristoKolev/4f3f537f4883a3fd20d9cc8f99876187 to your computer and use it in GitHub Desktop.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment