need good wrapper

Cameron Simpson cs at zip.com.au
Fri Jun 10 06:17:37 GMT 2005


On 09Jun2005 15:23, Anne Ramey <anner at blast.com> wrote:
| I'm having trouble with the rsync wrapper's I've found online:
| rsync_wrapper[8458]: SSH_ORIGINAL_COMMAND environment variable 
| apparently not set
| rsync: connection unexpectedly closed (0 bytes read so far)
| rsync error: error in rsync protocol data stream (code 12) at io.c(189)
| 
| I'm not sure if this is a problem of incompatibility between my RHES3 
| and the wrappers I've found or a problem I could fix in the OS.
| 
| ideas?

This isn't an rsync thing, it's an ssh thing.

$SSH_ORIGINAL_COMMAND is set by modern sshds to be the command passed.

For example, suppose I go:

	ssh host 'ls foo'

On the remote machine "host" the shell environment will have
$SSH_ORIGINAL_COMMAND set to "ls foo".

This is important when using the "command=" option in the
.ssh/authorized_keys file. It lets you place a command there to be
unconditionally run when someone connected with a particular key, and
that command can then examine $SSH_ORIGINAL_COMMAND to see what was
really asked for.

I expect your wrapper is relying on this to verify the "rsync in daemon
mode" command that rsync passed over ssh to the remote rsync, and I'm
further expecting that the sshd on the remote system is not setting
$SSH_ORIGINAL_COMMAND.

What version of ssh is being run on the remote system?

Test mechanism:

	ssh host env

and see what is there.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Gross power consumption [...] such as 3D graphics and MPEG-2 are the
two applications which consume a disproportionate amount of power [...]
eating close to 18 watts of power. Close behind is Microsoft Word 7.0,
which consumes close to 16 watts of power.


More information about the rsync mailing list