Hi! For your DevOps project, you're looking to set up SSH access for students using their own accounts on an Ubuntu 18.04 server. You want them to work within specific folders—like their home directories—so they can perform certain tasks without affecting the main system. I found information about SELinux that might help, but there are concerns about security risks and limited documentation for Red Hat or Debian environments. Are there faster, more straightforward methods you could explore? Let me know!
They are using sudo for various operations. A more secure approach would be to grant only the necessary permissions to specific folders and resources without any sudo access. Typically, users with sudo privileges have unrestricted capabilities on the system. You can also refer to the sudo configuration manual page if you need further details.
mainly installing packages and setting up various tools. However, I don’t want them to have access to the root folders—just their personal home directories so they can install everything there. We’re all new to Linux, so I’m not familiar with the system. I don’t want to reinstall the OS every day if that makes sense. Thanks for the advice. I’ll try it this afternoon and keep you updated! I wasn’t expecting it to be that straightforward.
Start with Ubuntu containers on your host and grant each one SSH access. They can connect via ports like 2022, 2122, or 2222. This creates a separate environment where they run as root without affecting your main system. For instance, you could run `docker run -d -v /root/.ssh/authorized_keys:/home/me/keys/daveskey -p 2022:22 ubuntu:20.04` for Dave, then log in from that container on port 2022.