Hi.
On Sun, 10 Dec 2023 10:14:16 -0500 Alex wrote:
I'm trying to use the "command=" ability with ssh and
rsync to restrict the
commands that can be run with a passwordless ssh key. The problem is that I
can't figure out the exact rsync that's being executed on the remote side.
I recall in the past being able to somehow log this information to syslog,
but now I can't remember and can't find it.
rsync will tell you that in super-verbose mode. Ex:
rsync -vvvvv ...
cmd=<NULL> machine=HOST user=<NULL> path=/tmp
cmd[0]=ssh cmd[1]=HOST cmd[2]=rsync cmd[3]=--server cmd[4]=-vvvvve.LsfxCIvu cmd[5]=.
cmd[6]=/tmp
opening connection using: ssh HOST rsync --server -vvvvve.LsfxCIvu . /tmp (7 args)
<snip>
I've also tried the SSH_ORIGINAL_COMMAND environment variable,
but it
doesn't seem to be set.
Weird: I use a similar setup and it is set in my case.
--
francis