|
I've been using to synchronize my Linux laptop and workstation with my server for quite a while. Most references for getting Unison to work on Windows require running cygwin (which is a minor pain) or generating keys with openssh. I really didn't want to go through that hassle. All of the machines are local to my network and I just don't need the higher level of security that the openssh keys would give. Here's a quick tutorial to get Unison working on Windows.
- Download Unison for Windows. I'm using version 2.17.1 because that's the version I'm using on Linux. Make sure the versions are consistent across all of your platforms.
- Run Unison once to set up the profile. Put in the directories you want to synchronize.
Root 1: C:\Documents and Settings\$USER\PATH Root 2: ssh://USER@HOST//path/to/sync
When you try to connect you may get the message "Uncaught exception Unix.Unix_error(20, "create_process", "ssh")". A more common error if you've tried to use plink as the ssh utility is "Fatal Error" "Lost connection with the server". Plink.exe doesn't support all of the commands that the full ssh supports. - In order to overcome the different command line options between plink.exe and ssh we will need to create a custom batch file to execute plink.
@plink %1 %2 %3 -pw yourpassword -ssh "unison -server -contactquietly" OR - if you have a public key (and another SSH port) @plink -P 2200 %1 %2 %3 -i "C:\path\to\key\id_rsa.pub" -ssh "unison -server -contactquietly" The @ at the beginning of the line is important. @echo off is not sufficient for this script. Save this script somewhere in your path. I called mine plink-cmd.bat and put it in c:\Windows. - Modify the .prf file to use the custom command we just created. Go to c:\Documents and Settings\$USER\.unison There is a file called default.prf (or something else if you named your profile something. Edit that file and add the following:
sshcmd=plink-cmd.bat - Rerun Unison and it should work. Happy synchronizing!
Another guide: http://www.omidyar.net/group/openonet/ws/unison/
|