Class WinPipeConnector

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Connector

    public class WinPipeConnector
    extends AbstractConnector
    A connector based on JNA using Windows' named pipes to communicate with an ssh agent. This is used by Microsoft's Win32-OpenSSH port.
    • Constructor Detail

      • WinPipeConnector

        public WinPipeConnector​(String pipeName)
        Creates a WinPipeConnector for the given named pipe.
        pipeName - to connect to
    • Method Detail

      • connect

        public boolean connect()
                        throws IOException
        Description copied from interface: Connector
        Connects to an SSH agent if there is one running. If called when already connected just returns true.
        true if an SSH agent is available and connected, if no SSH agent is available
        IOException - if connecting to the SSH agent failed
      • rpc

        public byte[] rpc​(byte command,
                          byte[] message)
                   throws IOException
        Description copied from interface: Connector
        Performs a remote call to the SSH agent and returns the result.
        command - to send
        message - to send; must have at least 5 bytes, and must have 5 unused bytes at the front.
        the result received
        IOException - if an error occurs