I have a server environment for which the only methods of login would be SSH or local terminal in the datacenter. I have set this up to allow a specific user to login only with a key, not password (explicitly disabled). This user also has no password set.
Because of the things this user needs to do on the server, I have granted password-free sudo access, using (in the sudoers file):
username ALL=(ALL) NOPASSWD: ALL
Obviously, this can be a security issue. I need to ensure that the user cannot login to the server by any means other than SSH, using our closely guarded SSH keys. All SSH logins are extremely well protected, and locked to a specific IP address too, so that coupled with the key-based login, is secure (as it can be). I wish to eliminate the ability to login via our datacenter to ensure that the user cannot login from there, and only SSH.
How do I prevent those unauthorized access attempts?