On Mon, Jul 19, 2021 at 12:44 PM Jesse Thompson wrote: > *TL:DR;* I'm looking for options to reliably start and manage an ssh-agent > daemon in Cygwin.
I recommend the "keychain" package, which is available in Cygwin. You'd add something like the following to your shell initialization scripts: /usr/bin/keychain -q $HOME/.ssh/*_?sa source $HOME/.keychain/$HOSTNAME-sh This ensures that you get prompted for your key password on first login, which unlocks all the key-file args when keychain adds them to the ssh-agent that it starts for you. Any subsequent shells just share the existing ssh-agent. If you don't like that the password prompt happens at login time, you could leave off the list of default key files and add them using ssh-add later on. I sometimes go this route and use a ~/bin/ssh shell script that looks like this: #!/bin/bash case `ssh-add -l` in *2048*|*1024*) ;; *) ssh-add ~/.ssh/*_?sa ;; esac exec /usr/bin/ssh "${@}" This method asks you for your key password the first time you run ssh. ..wayne.. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple