Using built-in SSH with Git on Windows 10
Starting with Windows 10 version 1803 a native version of OpenSSH is bundled and installed by default.
If you are using posh-git you’ll notice that the Start-SshAgent
command fails with an error:
unable to start ssh-agent service, error :1058
Error connecting to agent: No such file or directory
This is because by default the OpenSSH agent (ssh-agent) service is disabled. To enable it, open an elevated PowerShell window and run:
Set-Service -StartupType Manual ssh-agent
Now Start-SshAgent
will work as it always has, however by default Git (for Windows) will continue to use the bundled OpenSSH package.
This means that you are now running an ssh-agent that Git will not use.