Welcome to the Linux Foundation Forum!

permission by ssh for a user

Dear I have a query, I'm new to Linux and currently have a server with 3 websites and a Mysql database for each, the need arises to create a user and allow access to the directory of one of the websites by SSH and equal access to its database. which would be the best practice in ubuntu 18.04, I do not compromise the security of the entire server and other websites that have nothing to do with the new user.

Answers

  • Hi @rrodresq ,

    Currently we use ssh keys to authenticate, so you don't need to keep the password in any file or paper in the desktop. Once you are connected to the remote server, you can use 'sudo' to run any command with root permissions.

    Regarding security, you can have different ssh keys for each server, so the operator/sysadmin can access one server only with the couple of keys (public/private).

    In the case you need to do the samething on these three servers, you may use Ansible with templates (or any other solution you find best for the specific tasks).

    Many regards,
    Luis.

Categories

Upcoming Training