Starting ssh-agent on Windows 10 fails: “unable to start ssh-agent service, error :1058”

后端 未结 3 1368
南笙
南笙 2020-12-22 16:05

When I try to start the ssh-agent on Windows 10 via PowerShell (with elevated right or without) by entering Start-Service ssh-agent I get the error

3条回答
  •  北海茫月
    2020-12-22 16:08

    Yeah, as others have suggested, this error seems to mean that ssh-agent is installed but its service (on windows) hasn't been started.

    You can check this by running in Windows PowerShell:

    > Get-Service ssh-agent
    

    And then check the output of status is not running.

    Status   Name               DisplayName
    ------   ----               -----------
    Stopped  ssh-agent          OpenSSH Authentication Agent
    

    Then check that the service has been disabled by running

    > Get-Service ssh-agent | Select StartType
    
    StartType
    ---------
    Disabled
    

    I suggest setting the service to start manually. This means that as soon as you run ssh-agent, it'll start the service. You can do this through the Services GUI or you can run the command in admin mode:

     > Get-Service -Name ssh-agent | Set-Service -StartupType Manual
    

    Alternatively, you can set it through the GUI if you prefer.

提交回复
热议问题