Skip to content

step-cli cant use cygwin ssh-agent #333

Open
@unreality

Description

@unreality

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions