What I want

Well, I need a way to allow multiple (10-15) ubuntu users to run commands with root privileges (sudo) via ssh, but in a way that doesn't affect the machine neither other users. Some commands would be executed is apt-get and update for installing some lightweight applications, creating users, changing directory permissions and creating cron jobs.

Obs: it's ok if all changes were lost.

Solutions I pondered

Virtual Machines

So the ideal thing I have in mind is to have virtual machines, each one with one user. But my ubuntu server isn't capable of handling too many virtual machines like that.


I found out that docker may work for that, but the thing is, I never worked with docker and I wonder how much memory and cpu 10-15 docker containers would need. Also wonder if the commands would even work the same way, and if the users inside the container could in a way damage the host system.

Fake commands

I was thinking about making a fake SSH interface, where commands produce output if written correctly but aren't actually executed. Maybe that would be too silly.

In a nutshell, how I make someone in a ssh connection do commands as if he is alone, when in fact he isn't, while using small ammount of RAM and CPU, and being somewhat secure.


I think you should consider Docker because it does not hog on resources. Otherwise point your students/users to an online and free Linux SSH service at https://bellard.org/jslinux/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.