Description
If a user attempts to use step-ca under a cygwin shell, many times they will have the cygwin versions of ssh/ssh-agent installed. step-cli is unable to connect correctly to the cygwin version of ssh-agent. I believe this is because step-cli detects it is running under windows and attempts to connect to the hard-coded OpenSSH for Windows named pipe (\\.\\pipe\\openssh-ssh-agent
) instead of any SSH_AUTH_SOCK that may be defined.
I'm unsure how to fix this since cygwin uses a weird UNIX pipe implementation and I couldn't find any information about connecting to them in go.
As a workaround users can create a proxy pipe that will connect their cygwin environment with the ssh-agent that is running as a service when they install OpenSSH for Windows by running something similar to the following:
socat UNIX-LISTEN:/tmp/openssh-ssh-agent,umask=066,fork EXEC:"PLINK.EXE -serial //./pipe/openssh-ssh-agent",pipes
then running export SSH_AUTH_SOCK=/tmp/openssh-ssh-agent
to identify which socket to use to ssh