-
Notifications
You must be signed in to change notification settings - Fork 783
ssh-agent doesn't work if the server side components (sshd) are not installed #558
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
Comments
Can you check if the process id under the following matches that of ssh-agent.exe process? If not delete the above entry and restart ssh-agent. This problem should go away in next drop as these checks were removed in code. |
The ProcessID value did match the ssh-agent.exe PID, but even after removing the property and restarting the ssh-agent service, the problem remains with the same output from the Does the ssh-agent service require that the SSHD service is also required? I have OpenSSH installed with the agent but not the server (via Chocolatey package param |
It should not. Do you have ssh-agent logs? Looks at Wiki Troubleshooting link. |
I did look at the Troubleshooting wiki page, but it exclusively refers to sshd, not ssh-agent. As far as I can tell, there's no enhanced logging for ssh-agent the way there is for ssh and sshd. |
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting%20Steps |
There was no logs folder, either, but after creating one a ssh-agent.log file was generated in it. I put LogLevel to DEBUG3, and here's what showed up in the log file (using same scenario as above):
|
@manojampalam - I am thinking the chocolatey package could just create the logs folder all the time so that this confusion could be avoided? Maybe you could also put an empty flag file in the logs folder in the zip so it is created? I wouldn't do just an empty folder as many unzippers have to be explicitly told to create empty folders. |
@DarwinJS maybe just create it whenever the sshd or ssh-agent options are used? Unless ssh uses the same directory for client logs (which doesn't sound right). |
@DarwinJS yes please. |
@manojampalam - already added along with a couple additional logging features: #577 |
@coldacid do you still see this issue? Did you try out the latest version? |
@manojampalam just updated to 0.0.10.0 now and gave it a shot. Same results:
|
Probably doesn't actually need to be said, but after testing 0.0.11.0 I can report that the problem here persists.
|
Thanks for your patience @coldacid. I'm working on this now. |
EDIT: Just realized that 0.0.12.0 is now available. I tried this with 0.0.11.0. I'll provide updated log and details once the Chocolatey package is updated and installed. |
Okay, so with 0.0.12.0, nothing seems to have changed. Shell commands/output:
ssh-agent.log:
|
OK. I added additional tracing in ssh-agent.exe. Can you replace with the attached one and regenerate traces? |
Shell:
ssh-agent.log:
Looks like LookupAccountName doesn't like whatever name is being passed to it. If it helps, my system is not on a domain (seems to a common issue from a quick search of that error code) but it does use a Microsoft account login. |
LookupAccountName is looking for "NT Service\SSHD" You could do this in Powershell |
Ah, I don't have the sshd service set up on this system. My expectation was that like on other platforms, ssh-agent would be usable without running the daemon as well. |
You are right. Client side should work independently. I'll fix this for next drop. For the time being as a work around - install the server side components too. |
Fix for this included in PowerShell/openssh-portable#121 and committed as part of |
We found some reliability issues with recent changes and will need time to do stabilization. This issue has been fixed but a drop wont be available till Mid May. Thanks for your patience. |
Thanks for keeping me updated, @manojampalam. I'll hold my horses a little while longer! |
Just tried out 0.14.0.0 and happy to say that I can add my SSH keys to ssh-agent without a problem now. Thanks @manojampalam! 🥇 |
I ran into this exact issue today. I've installed openssh following the first-use article
using Installing OpenSSH Server resolved this issue
Is the client intended to handle this or will sshd always be required? |
Whenever trying to add or list identities in ssh-agent, the ssh-add process fails with the message "communication with agent failed". For example:
The text was updated successfully, but these errors were encountered: