Hello, I’m trying to configure rdist over SSH so that it connects at target side as a particular user.
I’m using CentOS 7.3 on both ends (I also tested with Fedora 25 with the same behavor)
So I create at source side the file ~/.ssh/config under mysourceuser home
Then, connected as mysourceuser user on local server
$ SSH targetsrv.localdomain.local email@example.com’s password:
So far so good as expected.
But if I create a small distfile to distribute a file on targetsrv.localdomain.local and execute rdist on it, I receive the prompt of mysourceuser password, not mytargetuser one….
$ rdist -P /usr/bin/ssh -f ./distfile distrotest firstname.lastname@example.org’s password:
It seems the config file is not honored. I tried different combinations but none worked eg creating a wrapper script that runs SSH -F config_file “$@”
I can workaround the problem using inside the distfile
“email@example.com” instead of
“targetsrv.localdomain.local” , this way it works. But I would like to avoid it if possible as I have a distfile with many entries and variables as destination hosts target.
Any help appreciated