返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
Windows

Enable ssh-agent on Windows 11

Microsoft has so many pitfalls!!!

曦远 (DealiAxy)约 3 分钟
目录5 个章节

Introduction

I previously covered Passwordless SSH Login on Windows 10, but Windows 11 is a bit different now.

So I wrote another post.

Background

Microsoft’s current official documentation clearly states:

The ssh-agent service on Windows is Disabled by default.

So you need to un-disable it first, then start it.

Steps

In PowerShell with administrator privileges, run:

# 管理员 PowerShell
Set-Service -Name ssh-agent -StartupType Automatic
Start-Service ssh-agent

If there are no errors, it succeeded.

At this point, running ssh-add will work normally.

Forward Agent

If you want to forward the local ssh-agent to a remote server, add the -A parameter when connecting:

ssh -A user@remote-server

Or configure it in ~/.ssh/config:

Host remote-server
    HostName remote-server
    User user
    ForwardAgent yes

References

_EOF_

Enable ssh-agent on Windows 11

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…