Is it possible to create users (non-sudoers) that can only use the command mysql ? or set of commands ?Context: I have a server hosting a mysql database. I want to give some users the rights to connect to the server via SSH but only so they can use the mysql client.I am using a the Amazon linux AMIPs : Using the command option in the authorized_keys file is not a correct solution.
How to limit users permissions to only use mysql
permissions;account restrictions
It's best to add a user with restricted privileges, see this post for more details. On the other hand you can also limit his login shell,  for exampleuseradd -s $(which mysql) whatshisnameThis makes his default shell mysql