3

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

unison /var/www ssh://192.168.1.102//var/www

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.

4

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

Host UnisonHost
    HostName 192.168.1.102
    User username

and then call unison with UnisonHost:

unison /var/www ssh://UnisonHost/var/www
1

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

unison /var/www ssh://username@192.168.1.102//var/www

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

root /var/www
root ssh://username@192.168.1.102//var/www
0

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

[username]@[host]:[uri]

Or in your case,

pekasus@192.168.1.102:/var/www

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

  • 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.