-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add keys to ssh-agent, communication with agent failed #1234
Comments
see if this helps: #1133 |
I read through this issue. I am using posh-git so I tried deleting the environment variables SSH_AGENT_PID and SSH_AUTH_SOCK but they don't exist. I'm guessing I'm using a newer version of posh-git? Not loading posh-git doesn't seem to help either and the ssh-agent service starts fine. |
That check in ssh-agent can be removed as sshd now runs as SYSTEM. We'll fix it. As a workaround to unblock you, could you create/install a dummy sshd service like this: |
I created the dummy sshd service as described. ssh-add now works as expected. Thank you @manojampalam! This was driving me crazy. |
PowerShell/Win32-OpenSSH#1263 Issue: ssh-agent is using default sign algorithm, without considering related flags in request Fix: parse flags and consider sign algorithm input PowerShell/Win32-OpenSSH#1234 Issue: ssh-agent has old logic to lookup sshd account Fix: remove this redundant logic
Sorry to reanimate a dead thread, but just wanted to chime in that this solution works even for this failure in Oct 2019, thank you very much! |
@manojampalam are you able to give an indication as to when this might ship? This ticket is closed but the need to create a dummy
|
The workaround is still relevant in July 2020! |
@ISkomorokh - The fix be part of next windows release which is available in fall timeframe this year. |
|
workaround still relevant... winver 20H2 |
I think this saga will finally be closed by #1693. Good job Microsoft, it only took two years 🎉 |
@LukeCarrier , I installed openssh via chocolatery, but still have this error. Why do you think it is solved by that release? |
You can also just install the OpenSSH server windows feature to mitigate this issue even if you never start the openssh server service. |
Still relevant sadly and yes the workaround above does work, cs.exe wrapper. Feels like this should have been a pretty high priority awhile ago, but at least there's indication that the fix is coming. |
Just ran into this and the workaround fixed it. Thanks! |
Still a good workaround in February 2021. Thank you |
worked like a charm, thank you :) |
Windows 10 20H2 build 19042.746. |
Still needed workaround |
I had to run powershell as administrator to run this, but then I could ssh-add in any other powershell terminal. |
March 2021...workaround still needed and still works |
ssh-add used to work until last week, this week it needs the workaround. This issue needs to be reopened. |
winver 20H2
|
HAY I know this is old, hope you are still around. When I tried using the work around with my local user path I got the error: [SC] OpenSCManager FAILED 5: Access is denied. Do you know how I am able to fix this error? |
Hi @jbanks9 you need to run PowerShell with Administrator privileges. It worked for me just now. |
Sorry to revive this thread; but the workaround unfortunately did not work for me, despite running in admin priv... |
"OpenSSH for Windows" version
Installed in c:\Windows\System32\OpenSSH in the 1803 Windows update.
Client OperatingSystem
Windows 10 Pro 1803
What is failing
ssh-add can't add keys to the ssh-agent.
Expected output
The keys are accepted and listed when
ssh-add -l
is run.Actual output
output from ssh-agent.log:
4688 2018-08-16 15:19:37.613 error: LookupAccountNameW on SSHD account failed with 1789
4688 2018-08-16 15:19:37.615 fatal: failed to retrieve client details
13372 2018-08-16 15:32:40.157 error: LookupAccountNameW on SSHD account failed with 1789
13372 2018-08-16 15:32:40.157 fatal: failed to retrieve client details
972 2018-08-16 15:42:25.752 error: LookupAccountNameW on SSHD account failed with 1789
972 2018-08-16 15:42:25.752 fatal: failed to retrieve client details
9088 2018-08-16 15:47:46.669 error: LookupAccountNameW on SSHD account failed with 1789
9088 2018-08-16 15:47:46.672 fatal: failed to retrieve client details
There doesn't seem to be an sshd.exe in C:\Windows\System32\OpenSSH. I think I'm just missing a setting somewhere because I've gotten this working on other Windows machines of the same version with no issue.
The text was updated successfully, but these errors were encountered: