Skip to content

Instantly share code, notes, and snippets.



Last active Sep 26, 2019
What would you like to do?
Windows 10 native OpenSSH Agent

To enable ssh-agent and add private key into it:

Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent

ssh-add X:\xxx.ed25519

The permission of file X:\xxx.ed25519 need manual tweak before ssh-add:

  1. Right click X:\xxx.ed25519, click "Properties."
  2. Swtich to "Security" tab and click "Advanced"
  3. Click "Disable inheritance", and select "delete" them
  4. Delete anything left in the permission table, to make it empty.
  5. Click "Add", click "Select User or Group", type in your username, and click "OK"
  6. Click "Ok" for every dialog


When ssh-agent running, it listen on windows named pipe \.\pipe\openssh-ssh-agent

Windows named pipe is exact same thing as mkfifo on linux.

But on linux, ssh-agent is listening on an unix socket (more like TCP). Not on a fifo file.

So, They aren't compitable with each other.

Git has ssh executable selection builtin. To let git use native ssh.exe from windows, this is need to run once (in Git Bash):

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