Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What endpoint does the Windows OpenSSH Agent listen on

Does anybody know what endpoint the Windows OpenSSH Authentication agent listens on, and how it advertises this so that the Windows ssh.exe can communicate with it?

I know I'm a bit late to the party, but I recently noticed that my Windows PC has a service called "OpenSSH Authentication Agent", which is disabled by default. When enabled, it works quite well as the ssh-agent for the ssh.exe that comes with Windows 10 and later (C:\Windows\System32\OpenSSH).

In Unix operating systems the ssh-agent listens on a Unix socket, and the location of that socket is set in the SSH_AUTHSOCK environment variable. However in Windows there is no SSH_AUTH_SOCK environment variable and the Windows-supplied ssh.exe seems to find it anyway.

Furthermore, It's my understanding that Windows does not implement Unix sockets, so ssh.exe must be using a different mechanism.

like image 568
John Jeffery Avatar asked Sep 20 '25 13:09

John Jeffery


1 Answers

It's open source that is hosted on Github here

The wrapper tha runs ssh-agent as a Windows service is in the source tree here

And a quick glance of the code (agent.c) suggests that a Win32 named pipe is the IPC mechanism. You might want to dive deeper into the code including building, running and debugging locally.

like image 192
selbie Avatar answered Sep 22 '25 09:09

selbie