Skip to content

Agent Forwarding Windows client to Windows host not working? #1865

Open
@monil-patel

Description

@monil-patel

Originally posted here: PowerShell/openssh-portable#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 #1136 (comment) 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

  1. used keygen to generate public/private keys and added public to github.com
  2. ssh-add "location of private key". Can see them on client machine through ssh-add -l
  3. 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.
  1. Specified ForwardAgent in the ssh config
Host my-pc
  HostName host...
  User username
  IdentityFile C:\Users\user\.ssh\id_rsa
  ForwardAgent yes

  1. ssh to my-pc, and run ssh -T [email protected] again

Expected output

# ssh session
PS C:\Users\monil> ssh -T [email protected]
Hi monil-patel! You've successfully authenticated, but GitHub does not provide shell access.

Actual output

# ssh session
[email protected]: 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions