0
I am on Windows 10 Pro.
I have added the following lines to my Cygwin (fully up-to-date) ~/.bashrc
file:
eval $(ssh-agent) > /dev/null
ssh-add > /dev/null 2>&1
in order for me not to have to do those each and every time as I typically don't do anything else than connect to Linux machines.
Notice, that I redirect the output of those commands to the black hole for me not really being interested in it, otherwise it would output something like:
Agent pid 11060
Identity added: /home/vlastimil/.ssh/id_rsa (/home/vlastimil/.ssh/id_rsa)
But, I noticed today, that for some reason, that those ssh-agent.exe
processes remain in memory after I log out and close Cygwin.
Question is:
How to automatically close the ssh-agent
along with closing Cygwin?
I think this is no viable solution if you open multiple terminals. It would kill the ssh-agent for the other terminals, too. – sweisgerber.dev – 2018-12-18T17:40:12.030
@sweisgerber.dev I since have found out, there is
ssh-host-config
program in Cygwin ;) – LinuxSecurityFreak – 2018-12-19T04:45:19.930I googled after @vlastimil 's short keyword comment and found: https://docs.oracle.com/cd/E24628_01/install.121/e22624/preinstall_req_cygwin_ssh.htm#EMBSC281 section:
– sweisgerber.dev – 2018-12-19T10:58:24.9105.4 Configuring SSH
this should help fellowssh-agent
configurators.