I spent way too long trying to figure out why I couldn’t get windows (using cygwin) to rsync to my linux server using a key exchange (so I can automate it). In the event anyone else is wanting to try this, I’ll post it here (assuming cygwin is already installed):
1. on the windows server run “ssh-keygen -t dsa” this will generate your key pair
2. make sure your rights are set correctly on the linux server for the .ssh directory and the files within it (this is what got me)
the .ssh directory should be 700 (ex. chmod 700 .ssh)
the files within it should be 600
3. copy your id_dsa.pub to the linux server from your windows server, then rename it authorized_keys, and move it into the .ssh directory (verify rights again)
that should be all, from there you should be able to ssh or rsync from the windows host to the linux one without need for a password.
Leave a Reply