I have multiple servers that I need to remote into. I prefer Cygwin over Putty to do so.
Anyhows - the process of opening my cool Mintty window and then typing the follo
You can do this without too much difficulty. Copy the existing Cygwin Terminal icon, right click on it, and select Properties. You should see something like the below in the Target field:
C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
Replace this with the following (replacing
and
as relevant):
C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico /bin/bash -l -c "eval `ssh-agent` ; ssh-add ; ssh @"
Repeat as necessary for your other servers. That's it!
(Detail: We replace the -
argument [which means to use the standard login shell] with an explicit call to bash to run your commands. The -l
part means to use a login shell, which in particular means your PATH
variable is set up and so bash can find ssh
. The -c
part just introduces the command, which you should recognize from your question.)