rsync without a shell

Net Llama! netllama
Mon May 17 11:43:07 PDT 2004


On Sun, 12 Jan 2003, Andrew Mathews wrote:
> Net Llama! wrote:
> <snip>
> >>>>>I'm trying to setup rsync over ssh without giving the user a shell
> >>>>>account.  Unfortunately, setting the user's shell to /bin/false prevents
> >>>>>the rsync from running, as it fails with this error:
> >>>>>rsync: connection unexpectedly closed (0 bytes read so far)
> >>>>>rsync error: error in rsync protocol data stream (code 12)
> <snip>
> >> From the rsync man page:
> >>You can also specify an alternative to rsh, either by using the -e
> >>command line option, or by setting the RSYNC_RSH environment variable.
> >>One common substitute is to use ssh, which  offers  a  high  degree  of
> >>security.
> >>[....]
> >>RSYNC_RSH
> >>The RSYNC_RSH environment variable allows you  to  override  the
> >>default  shell used as the transport for rsync. This can be used
> >>instead of the -e option.
> >>Have you tried this?
> >
> >
> > I think so, but i don'[ understand what its asking me to do.  I've set
> > RSYNC_RSH=ssh
> > but that's prolly not right. Would i set it to /sbin/nologin ?
> >
>
> I believe so. I'm pondering whether rsync would need to read from stdin
> which would increase the difficulty of using an account without a shell.
> Hmmm....

I don't think rsync is the problem as much as ssh.  anoymous rsync works
just fine.  once you add ssh to the picture, that's when it needs the
ability to accesss a shell.  ugh.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lonni J Friedman				netllama at linux-sxs.org
Linux Step-by-step & TyGeMo		     http://netllama.ipfox.com


More information about the Linux-users mailing list