ssh-agent to be started when I start Cygwin, since I use ssh passthrough often.
I tried adding:
.bashrc, but any time I use
Alt-F2 to open a new terminal window, the
.bashrc is run and hence new
ssh-agents are created which is undesirable and messes with the passthrough.
I then tried moving the eval command to
.bash_profile, but this too results in the same problem - I guess every new terminal window is considered a new login shell.
A third option is to use
cygrunsrv, but I just found about it and am not clear on how to use it for this specific purpose, and perhaps more importantly, how to pass on the
SSH_AGENT_PID information from where the service is created to every new shell created.
Any suggestions on the best way to achieve this outcome - where a single ssh-agent is executed and waiting, and its information is immediately available to be used in any newly opened shell - is welcome.