Discussion:
[unison-users] ssh host address being lost somehow
David Gray dph3dg@gmail.com [unison-users]
2018-05-05 19:20:23 UTC
Permalink
I posted this on the freebsd forum but I should have tried here first, from
the horse's mouth so to speak:
I'm using unison sync from FreeBSD on the local machine but when I try to
use it from ssh somehow the ssh host name gets lost.
ie unison -testserver <somefilename> ssh://<someusername>@<some IP address
1.1.1.1>:<someportnumber//absolute/path
returns connected ////absolute/path -> //localhostname//absolutepath
The absolute path on the server is correct but there should be a the IP
address 1.1.1.1 between // and // and not the four ////.
The unison complains that it can't create the file as it thinks //// is on
the localhost. For instance if I use /tmp as the absolute
path name on the remote host it creates files in the /tmp directory of the
local host.
Has anyone come across this behaviour before? Maybe using host in ssh
config could be a solution as somone else mentioned -host using the
socket:// connection method. Does that seem plausible?
sesc03@web.de [unison-users]
2018-05-06 05:31:46 UTC
Permalink
I've never seen anything like that before. My first hunch is that a configuration or library bug on your remote host leads to the gethostname() system call there returning an empty string. (Side note: What is expected would in any case be a short hostname such as "myserver", not the IP address.) You could try setting the UNISONLOCALHOSTNAME environment variable to something suitable, in your ~/.profile or similar on the remote host.


Reference:
http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#archives http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#archives

Sebastian


---In unison-***@yahoogroups.com, <***@...> wrote :

I posted this on the freebsd forum but I should have tried here first, from the horse's mouth so to speak: I'm using unison sync from FreeBSD on the local machine but when I try to
use it from ssh somehow the ssh host name gets lost.
ie unison -testserver <somefilename> ssh://<someusername>@<some IP address 1.1.1.1>:<someportnumber//absolute/path
returns connected ////absolute/path -> //localhostname//absolutepath
The absolute path on the server is correct but there should be a the IP address 1.1.1.1 between // and // and not the four ////.
The unison complains that it can't create the file as it thinks //// is on the localhost. For instance if I use /tmp as the absolute
path name on the remote host it creates files in the /tmp directory of the local host.
Has anyone come across this behaviour before? Maybe using host in ssh config could be a solution as somone else mentioned -host using the socket:// connection method. Does that seem plausible?
Loading...