I'm thinking about security, I've done a specific setup to run rsync
over internet and was thinking about security, this is the setup:
Destination server has an SSH jail user only with
bash
andrsync
, with a mounted folder calledfiles
that contains files, and nothing more.Source server runs:
rsync [params] /source -e "ssh -p [port]" destjaileduser@destinationserver:/files/
If someone discovers the password of the jailed user, they can only run rsync
, nothing else (rsync
is needed for remote sync, can't remove).
Question is: Is it possible for this jailed user to make his way out of the jail and access the system by any way, since he is limited? If yes, what can be done to prevent it?
The only thing I thought that the user could do is to place some program in rsync
source and run rsync
to send it to the server, but could the user do anything, since he is jailed and can't see the real system? The files, if affected by ransomware or wiped out, no problem, they have cryptography and are copied to another place that the jailed user can't see.
Am I doing things right?