$>unison /mnt/c/Users/v/docs/ ssh://logos//home/vama/docs/
Unison 2.52.1 (ocaml 4.04.2): Contacting server...
bash: line 1: unison: command not found
Fatal error: Lost connection with the server
https://alliance.seas.upenn.edu/~bcpierce/wiki/index.php?n=Main.UnisonFAQTroubleshooting
The command line "unison work ssh://remote.dcs.ed.ac.uk/work" fails, with "fatal error: could not connect to server." But when I connect directly with ssh remote.dcs.ed.ac.uk/work, I see that my PATH variable is correctly set, and the unison executable is found. In the first case, Unison is using ssh to execute a command, and in the second, it is giving you an interactive remote shell. Under some ssh configurations, these two use different startup sequences. You can test whether this is the problem here by trying, e.g.,
ssh remote.dcs.ed.ac.uk 'echo $PATH' and seeing whether your PATH is the same as when you do
ssh remote.dcs.ed.ac.uk [give password and wait for connection] echo $PATH One method that should always work is this [thanks to Richard Atterer for this]: log into the machine, set up PATH so the program is found execute
echo "PATH=$PATH" >>~/.ssh/environment
Then change PermitUserEnvironment yes
in /etc/ssh/sshd_config
Restart ssh server sudo systemctl restart ssh