Hi Rob,
On 2020-12-04 06:59,
rob...@gmail.com wrote:
> ssh server "LC_ALL=C ; export LC_ALL;
> PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin;
> export PATH; cd /use/local/xyzapp/ && git pull origin master"
hmm, just noticed that the path after `cd` seems to start with `/use`;
I'm not sure if that's intentional, or just a typo instead of `/usr`.
>
>The ssh configuration on that server, and my ~/.ssh/config are consistent
>with other servers, allowing agent forwarding.
>
>I'm using Rex 1.12
>
>How can I diagnose what's going on?
First I would check which SSH backend module Rex is using for that
connection. It can be either Net::SSH2 or Net::OpenSSH based on feature
flags, operating system, availability of the module, rex configuration,
etc. The debug output should show that somewhere at the beginning with
`rex -d ...`.
Then I'd continue debugging based on that module's documentation.
For example Net::OpenSSH used the ssh binary and therefore it should
support `~/.ssh/config` too. In case there's some interference with Rex,
it's possible to force constructor options by configuring
`set_openssh_option` in the Rexfile or modules
(see
https://metacpan.org/pod/Rex::Config#set_openssh_opt). Should you
need more info, Net::OpenSSH has its own debugging options too:
https://metacpan.org/pod/Net::OpenSSH#DEBUGGING.
In contrast, Net::SSH2 relies on libssh2 under the hood, and thus
doesn't use `~/.ssh/config`. In this case some of the options might be
configured by Rex, but it's probably better to use Net::OpenSSH if
possible (for example with `set connection => "OpenSSH";`). I expect
Net::SSH2 also has its own debugging features for more detailed
debugging of what it thinks about the connection.
Hope this helps to track your issue down!
Cheers,
FErki