PowerShell / PowerShell/Win32-OpenSSH
SSH Agent forwarding from Linux to Windows does not populate ssh-agent with public key
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
"OpenSSH for Windows" version
7.7.2.2
Server OperatingSystem
Windows Server 2019 Standard
Client OperatingSystem
What is failing
ssh agent forwarding from linux to windows
Expected output
ssh-add -l
2048 SHA256:abcdefghijklmnopqrstuvwxyz (RSA)
Actual output
ssh-add -l
The agent has no identities
I have added AllowAgentForwarding yes to the sshd_config in C:\ProgramData\ssh\sshd_config. I have tested this with both an administrative user and a non-admin user. I am able to ssh -A user@win2019host from a linux host and connect to the windows 2019 server without issue. However I am not then able to see the key in the ssh-agent.
Is this expected to work? I see conflicting documentation that AllowAgentForwarding was not supported as of 2018, however, the current documentation on docs.microsoft.com doesn't mention this as an unsupported feature.
I have attempted to set SSH_AUTH_SOCK=\\.\\pipe\openssh-ssh-agent and still ssh-add -l says it has no identities.
Just wishing to confirm if this is expected to be supported, as I haven't seen documentation that says it should not be supported. Or if it is related to the lack of Unix Domain Sockets in windows. Would be nice to use my ssh key from my linux host to pull git repo's on remote windows machines. Thanks for the response! Appreciate all the hard work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Linux-to-Windows forwarding path with OpenSSH for Windows 7.7.2.2, checking C:\ProgramData\ssh\sshd_config and AllowAgentForwarding yes. Compare ssh-add -l before and after ssh -A user@win2019host, including SSH_AUTH_SOCK=\.\pipe\openssh-ssh-agent; done means forwarded identities are listed or the supported behavior is documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100