Setup Unison

From banana_wiki
Jump to: navigation, search

In the never ending search for a private, self-hosted dropbox solution Unison offers a great solution.

Unison is a multi-platform synchronizing program. It can go over ssh or rsync and requires a server (*nix based) to dump to.

First is to setup the server. For this example we are going to use Debian.

apt-get install unison openssh-server ssh

Next we need to generate ssh keys so you dont have to enter your password every time you want to sync.

ssh-keygen -t rsa

Once the keypair is generated.

cp ~/.ssh/ ~/.ssh/authorized_keys chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys

Next make sure you move (remove from the server) the ~/ssh/.id_rsa to the clients. If you are adding a linux machine to be a client you can use the ssh-copy-id command.

For windows clients run puttygen.exe. Import your existing private key, then save the result as a new .ppk file. Delete the original key file. Again, only the owner should have read perms on this file. At a minimum, your .unison.prf file should contain the following:

root = [Windows path] root = ssh://[user]@[host]//[Linux path] sshargs = -i [path to private key]

‘’’Client install for windows:’’’

Unison Program

GTK Library

ssh for Windows

‘’’Client install for mac:’’’

for Intel

for PPC

‘’’Client source for Linux/Unix’’’


To compile from source :

apt-get install install ctags gcc ocaml make <math>>wget </math>>tar xzvf unison-2.40.61.tar.gz <math>>cd unison-2.40.61 </math>>type “``make UISTYLE=text.” <math>>make </math>>chmod 0755 unison <math>>cp -Rp unison /usr/bin/ #be sure it is 0755 </math>>type “unison -version” #to see the right version is installed.(version 2.40.61)

$>that’s it :)

Sources: [1][2] [3][4]