PowerShell / PowerShell/Win32-OpenSSH
Agent Forwarding Windows client to Windows host not working?
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Originally posted here: https://github.com/PowerShell/openssh-portable/issues/540 , but was asked to open an issue here
"OpenSSH for Windows" version
8.1.0.1
Server OperatingSystem
Windows 10 Enterprise
Client OperatingSystem
Windows 10 Pro
What is failing
Unable to forward ssh keys through agent forwarding from windows client -> windows server
Is agent forwarding supported when connecting from a windows client to a windows host machine ?
I tried all of the things below, but had no luck and stumbled across this comment https://github.com/PowerShell/Win32-OpenSSH/issues/1136#issuecomment-500549297 which says Agent forwarding is not supported on the server yet, but you should be able to use the client to forward agent to a non-Windows target.
Was following these instructions from github : https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding
- used keygen to generate public/private keys and added public to github.com
- ssh-add "location of private key". Can see them on client machine through ssh-add -l
- Test using agent
PS C:\Users\monil> ssh -T git@github.com
Hi monil-patel! You've successfully authenticated, but GitHub does not provide shell access.
- Specified ForwardAgent in the ssh config
Host my-pc
HostName host...
User username
IdentityFile C:\Users\user\.ssh\id_rsa
ForwardAgent yes
- ssh to my-pc, and run ssh -T git@github.com again
Expected output
# ssh session
PS C:\Users\monil> ssh -T git@github.com
Hi monil-patel! You've successfully authenticated, but GitHub does not provide shell access.
Actual output
# ssh session
git@github.com: Permission denied (publickey).
Cant list any keys under the ssh session
# ssh session
C:\Users\monil>ssh-add -l
Error connecting to agent: No such file or directory
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
Start by checking the Win32-OpenSSH agent-forwarding behavior for a Windows client connecting to a Windows host, using the provided ForwardAgent configuration and ssh-add commands. Reproduce the session and verify whether the forwarded agent can be listed and authenticate to GitHub; done means confirming support and documenting the limitation or making that flow work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100