SSH cmdlets missing from posh-git

After repaving my machine and installing the latest version of posh-git I noticed that my Powershell profile was no longer working properly. I was using the Start-SshAgent cmdlet to load my SSH keys and well, it was no longer recognized.

When I checked the GitHub repository, it was not immediately clear that these have been moved to a separate project: posh-sshell. Follow the instructions (or clone the repository), and include this new Powershell module as well in your profile!

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.