简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM