zl程序教程

您现在的位置是:首页 >  后端

当前栏目

How to maintain ssh-agent login session with Windows 10's new OpenSSH and PowerShell

sshWindows to 10 and &# with 39
2023-09-11 14:14:17 时间

How to maintain ssh-agent login session with Windows 10's new OpenSSH and PowerShell

回答1

You must configure OpenSSH Authentication Agent service to automatically start (or you can start it manually everytime when opening your powershell for the first time: Start-Service ssh-agent).

After that, you need to ssh-add C:\path\to\your\ssh\key\id_rsa only once. After that, everytime the ssh-agent is started, the key will be there. You can check with ssh-add -l.

EDIT: To have SSH agent to automatically start with Windows, you can run Set-Service ssh-agent -StartupType Automatic on a super-user powershell prompt.

 

windows service里面叫做,OpenSSH Authentication Agent

 Get-Service | Where-Object {$_.name.Contains("ssh")} | Select Status,Name,DisplayName

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