WinSCP and Cygwin
I am not a fan of believing something will not work, so I setup "Custom Commands" in WinSCP to startup Cygwin mintty terminals.
Most people believe Cygwin will not work with WinSCP.
SSH KEYSFirst of all you should have ssh keys to allow auto login to server.
With the following Custom command added to WinSCP you can auto add an ssh key. I setup this command with hotkey Ctrl+0.
C:\cygwin\bin\mintty.exe /bin/bash -ile /cygdrive/c/Dropbox/WinSCP/ssh.sh !U !@ !PThis is the ssh.sh script.
echo "USE THIS PASSWORD: $3"Which will echo the password for entry via WinSCP and allow you to setup your ssh key on the server you are connected to.
cat /.ssh/id_dsa.pub | ssh $1@$2 'cat - >>~/.ssh/authorized_keys2'
STARTING A CYGWIN TERMINAL (Mintty)
Now you need a command to launch Cygwin mintty.exe and log you into that server. This command I setup with hotkey Ctrl+1, which is very easy to use.
C:\cygwin\bin\mintty.exe /bin/ssh !U@!@
SSHPASSAnd that is all you need to use Cygwin with WinSCP.
If you really wanted to you could avoid ssh keys by installing sshpass into Cygwin.
I created another file, sshpass.sh like this.
C:\cygwin\bin\mintty.exe /bin/bash -ile /cygdrive/c/Dropbox/WinSCP/sshpass.sh !U !@ !P