OpenSSH for Windows

    openssh.jpg

    Notes for using ssh-agent

    It has come to my attention that there is an issue with ssh-agent, this is not a problem with the installer, but is a problem with the cygwin binaries themselves.
    I have chosen to identify this in case it is useful to anybody else using the ssh-agent software (which is likely a rather small majority)
    The application implies that is has exported SSH_AUTH_SOCK and SSH_AGENT_PID, however that does not appear to be the case. You have to manually set these from a command prompt in order for it to work correctly
    C:\Users\test>ssh-add
    Could not open a connection to your authentication agent.
    C:\Users\test>ssh-agent.exe
    SSH_AUTH_SOCK=/tmp/ssh-K8jqcJtFYSLw/agent.20604; export SSH_AUTH_SOCK;
    SSH_AGENT_PID=18844; export SSH_AGENT_PID;
    echo Agent pid 18844;
    C:\Users\test>ssh-add
    Could not open a connection to your authentication agent.
    .....
    C:\Users\test>set SSH_AUTH_SOCK=/tmp/ssh-K8jqcJtFYSLw/agent.20604
    C:\Users\test>set SSH_AGENT_PID=18844
    C:\Users\test>ssh-add
    C:\Users\test>


    A batch file can be used to work around this automatically
    for /f "tokens=1,2 delims==; " %%i in ('call ssh-agent') do (
    if "echo" neq "%%i" (
    set %%i=%%j
    setx %%i %%j )
    )