Skip to content

Instantly share code, notes, and snippets.

@akadlec
Last active March 27, 2020 18:29
Show Gist options
  • Save akadlec/65fd59e7f0e5ff0e85f7a2cfbb14cee2 to your computer and use it in GitHub Desktop.
Save akadlec/65fd59e7f0e5ff0e85f7a2cfbb14cee2 to your computer and use it in GitHub Desktop.

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment