How to interact with ssh-agent?
Summary of the new feature / enhancement
It is a question-suggestion. I want to use it from git-bash. Right now , the ssh-agent service doesn't listen on any address or exposes SSH_AUTH_SOCK variable. So, git (by git bash) or the associate ssh can't find it. I tried providing it with -a , didn't work. Tried to make it log using sshd_config, didn't work.
Even in the registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\OpenSSH\Agent it doesn't specify any socket. No handles. Couldn't find a way to work with it!
Proposed technical implementation details (optional)
Many options. Just make it work! (or document it please)
On windows it's not a socket, it's a named pipe, and its hardcoded to \.\pipe\openssh-ssh-agent
The SSH client on windows searches for this pipe name by default, but SSH_AUTH_SOCK can be set if you want it to use a different agent with a different pipe name.
Also git for windows won't use it because it includes its own ssh client. You have to set GIT_SSH_COMMAND to use the windows built in (or other) ssh client instead of its own.
On windows it's not a socket, it's a named pipe, and its hardcoded to .\pipe\openssh-ssh-agent
It would have helped some troubleshooting I was doing if that were displayed by ssh-agent -d:
C:\temp\ssh.test>ssh-agent -d
agent_start pid:65648, dbg:1
I think it should look more like:
C:\temp\ssh.test>ssh-agent -d
SSH_AUTH_SOCK=\\.\pipe\openssh-ssh-agent
agent_start pid:65648, dbg:1
On second thought, why doesn't ssh-agent act more like other platforms and display the information regardess of the -d option? Something like:
C:\temp\ssh.test>ssh-agent
SSH_AUTH_SOCK=\\.\pipe\openssh-ssh-agent
SSH_AGENT_PID=65648