After experimenting with some SSH tools of Cygwin that allow me to use the stored SSH keys on the Pageant utility of Putty in Windows, closing the window normally and trying to open a new one leads to the error mentioned in this article. For my surprise this doesn't happen only to Cygwyn but to other tools like Git Bash. The error is caused (as i though) for the SSH tools that i decided to start and use. The problems is that the ssh connections you made on the git bash or cygwin shells aren't being closed, which lets the available shell hanging and unavailable.
The solution is pretty simple, stop the active SSH service in your system either from the command line or using the task manager of Windows:
From the command line
Open a new terminal (
cmd.exe) and run the following instruction:
taskkill /F /IM ssh.exe
taskkill command finishes the given process that in this case is
Graphically with the task manager
If you want to do it graphically, start the Task Manager of windows (
taskmgr.exe) and search for
ssh-pageant.exe if listed) and end those tasks:
After killing the mentioned process, you will be able to open a new Cygwin terminal without any issue.
Happy coding !