cygwin ssh shortcut from windows desktop

后端 未结 2 904
遇见更好的自我
遇见更好的自我 2021-02-14 10:57

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

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-14 11:33

    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.)

提交回复
热议问题