My web host uses an elegant way of handling multiple sites while keeping each one self-contained. For me to login via
ssh, I use the following:
ssh hostname -l username1_sitename1
This does something along the lines of chroot-ing me to the particular directory related to
sitename1 and changing my UID to match. Same for if I used
ssh hostname -l username1_sitename2, etc. The login for
username1 uses the same password each time and the
hostname remains constant.
If another user,
username2, were to need access to
sitename1 then they can access said site using a similar scheme:
ssh hostname -l username2_sitename1
and they would be given the same UID as
username1 receives when accessing
I wish to replicate a similar scheme on one of my computers. Is it possible to achieve this without manually adding each incarnation of
username_sitename to the system?