ssh - 在 Windows 10 上启动 ssh-agent 失败 : "unable to start ssh-agent service, error :1058"

标签 ssh service windows-10 openssh

当我尝试通过 PowerShell(无论是否具有提升权限)在 Windows 10 上输入 Start-Service ssh-agent 启动 ssh-agent 时,出现错误

unable to start ssh-agent service, error :1058

当我通过 Get-Service ssh-agent 检查服务是否正在运行时,返回该服务已停止。

如何让 ssh-agent 运行?

最佳答案

是的,正如其他人所建议的,此错误似乎意味着 ssh-agent 已安装,但其服务(在 Windows 上)尚未启动。

您可以通过在 Windows PowerShell 中运行来检查这一点:

> Get-Service ssh-agent

然后检查status is not running的输出。

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

然后通过运行检查该服务是否已被禁用

> Get-Service ssh-agent | Select StartType

StartType
---------
Disabled

我建议将服务设置为手动启动。这意味着只要您运行 ssh-agent,它就会启动该服务。您可以通过服务 GUI 执行此操作,也可以在管理模式下运行命令:

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

或者,如果您愿意,也可以通过 GUI 进行设置。

services.msc showing the properties of the OpenSSH Agent

关于ssh - 在 Windows 10 上启动 ssh-agent 失败 : "unable to start ssh-agent service, error :1058",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52113738/

相关文章:

batch-file - 将包含许多文件的文件夹拆分为多个子文件夹 (Windows 10)

git - 无法 git fetch - 对等方重置连接

linux - 无需在 Ubuntu 15.04 上运行 `sudo docker -d` 即可让 docker 工作的技巧

android - 将 OpenCV 图像(或位图)从服务发送到 Activity (SurfaceView)

在某些设备上关闭应用程序时,使用闹钟管理器设置的 Android 闹钟会被销毁(Le2)

c# - StoreServicesFeedbackLauncher 不工作

jquery - 使用 jQuery Sortable SVG 图标在 Windows 10 IE 11 中消失

ssh - GO - 通过 ssh 连接执行命令时出现未知错误

postgresql - 类似 pgAdmin 的控制台软件

git - Jenkins,通过 ssh 与多个用户获取 git 子模块?