I have an AWS ubuntu server. Let's call the Key File "root-key.pem".
Let's suppose (for this example) that I have ten employees and we add a new employee every month and we let go of an existing employee every month. What would be the suggested way to enable users to access the server with admin credentials? They would need to be able to run sudo or have something like root privileges to be able to modify databases, ports, push/pull to git, etc.
The 'easiest' way to do this would be to give everyone access to the "root-key.pem" file, but then whenever an employee is let go, we would need to create a new file and then make sure all existing employees have access to it (and perhaps any down time where a developer may not have access to it, or be waiting on it, etc.).
The preferred way I think would be to create a user for each person (
sudo adduser travis) and then add them to the sudoers file and add their pem key to .ssh/authorized_keys. This is the path I tried to implement. It works in that it gives the user access to the server and they can run sudo, however it's a nightmare when people are trying to push/pull to git (GitHub).
What would be the best way to accomplish #2? Or is this a very difficult item to implement, and #1, though it is a bit sloppier and inconvenient when someone is let go, is the preferred way to go for all but very large organizations?