Windows 10 启动 ssh-agent 命令时,抛出 unable to start ssh-agent service, error :1058 :
(1)原因分析
ssh-agent 服务的启动类型设置不正确。
(2)问题解决
使用管理员权限运行 Power Shell,然后执行Set-Service -Name ssh-agent -StartupType automatic
Set-Service 命令可以启动、停止、挂起或暂停服务,具体描述如下:
The Set-Service cmdlet changes the properties of a service such as the Status, Description, DisplayName, and StartupType. Set-Service can start, stop, suspend, or pause a service. To identify a service, enter its service name or submit a service object. Or, send a service name or service object down the pipeline to Set-Service.
这里是把 ssh-agent 的启动类型设置为自动方式。