2

Cygwin emulates sockets by opening port and adding the port number and a "login" secret to a file instead of using windows named pipes.

Further there seems to be no access to Windows named pipes from cygwin.

How can I then access a named pipe (e.g. //./pipe/openssh-ssh-agent) from cygwin and vice versa (e.g. with socat)?

3
  • I'm looking for exact same thing! I'm the maintainer of github.com/evsar3/sshfs-win-manager and I'm trying to implement the use of the Windwos 10's OpenSSH key agent in my program. However, SSHFS-Win uses a cygwin environment and I can't access the named pipe from there. Please, let me know if you can make this work!
    – evsar3
    Commented Sep 13, 2020 at 14:12
  • @evsar3: if you just want to use the win 10 openssh key agent in cygwin as you describe, my own preliminary answer below should actually. However, I guess you do not want to bundle both socat and plink with your GUI.
    – till
    Commented Sep 13, 2020 at 22:21
  • Exactly, I wouldn't like to bundle any other piece of software, but I'm guessing that this is not possible. Anyways, if you discover how to make it, I would be very appreciated if you can tell me. Congratulations, great research so far!
    – evsar3
    Commented Sep 15, 2020 at 13:40

1 Answer 1

1

After reading this so answer and looking at https://github.com/jstarks/npiperelay/ I at least managed to get one direction done using socat and putty's plink (I somehow had a bit of trouble with npiperelay):

socat UNIX-LISTEN:/tmp/openssh-ssh-agent,umask=066,fork EXEC:"PLINK.EXE -serial //./pipe/openssh-ssh-agent",pipes

I actually build an agent-bridge that works nicely to let keepassxc manage my ssh-keys on cygwin.

The other way around seems to be a bit more tricky without writing a dedicated program but possible, as its done by the keepass plugin . Please add to this answer or add more straight forward ways without running tons of processes or writing custom code.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .