I am trying to set up Unison and am testing the connection. I run this command from the documentation:

unison /var/www ssh://

but it tries to log into the remote server using my local machine's username. I've tried several things, but nothing works. I've tried adding username@ssh... and also searched for flags to use, but found none.


You could create a config file for ssh(~/.ssh/config) with the content

Host UnisonHost
    User username

and then call unison with UnisonHost:

unison /var/www ssh://UnisonHost/var/www
|improve this answer|||||

User JRC's answer is almost correct. I'll just add a few details. Your command should be

unison /var/www ssh://username@

or if you create a Unison profile in ~/.unison/ (which you should), it should contain the lines

root /var/www
root ssh://username@
|improve this answer|||||

I'm not familiar with unison's syntax, but usually SSH addresses are written like


Or in your case,


Try that, to see if it works does the job. Don't include the 'ssh://' in front.

|improve this answer|||||
  • I tried that, but for Unison, you can't put username@ before the host. It has to read ssh://host – pekasus May 1 '16 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.