Create a new user account:
$ sudo adduser newuser
Add the user to the sudo group:
$ usermod -aG sudo newuser
Switch to the new user account:
$ su - newuser
Verify the superuser privileges by the sudo command:
$ sudo ls -la /root
Create .ssh folder in home directory:
$ mkdir ~/.ssh
Create authorized_keys file in side the .ssh folder and add the public key:
$ ~/.ssh/authorized_keys
Refresh ssh settings:
$ sudo service ssh reload
Verify SSH remote login
Update login access:
$ sudo nano /etc/ssh/sshd_config
Set:
PasswordAuthentication no
PermitRootLogin no
Refresh ssh settings:
$ sudo service ssh reload
Install Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/
Avoid typing sudo
:
$ sudo usermod -aG docker ${USER}
Automate Docker:
$ sudo systemctl enable docker
Install docker compose: https://docs.docker.com/compose/install/