PowerShell / PowerShell/Win32-OpenSSH

"ssh-add -x" - Failed to lock agent: communication with agent failed

Open
#1,436 3 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps

  1. Start OpenSSH Authentication Agent: Start-Service -Name ssh-agent
  2. Run ssh-add -l to verify that ssh-add can communicate with the agent. In my case it lists my certificate fingerprints.
  3. Run ssh-add -x

"OpenSSH for Windows" client version
ssh -V = OpenSSH_for_Windows_8.0p1, LibreSSL 2.6.5

Note: I don't have the server version of OpenSSH on my computer.

Client OperatingSystem
Windows 10 Enterprise

What is failing

ssh-add -x for locking the agent.

Expected output

PS C:\> ssh-add -x
Enter lock password: *************
Again: *************
Agent locked.

Actual output

PS C:\> ssh-add -x
Enter lock password: *************
Again: *************
Failed to lock agent: communication with agent failed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with ssh-add -x after running Start-Service -Name ssh-agent, and compare it with ssh-add -l using OpenSSH_for_Windows_8.0p1 on Windows 10. Trace the ssh-add agent-locking entry point and verify that the command accepts the password and reports Agent locked. rather than a communication failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.