A Digital Life

My Notebook

View My GitHub Profile

  • About
  • 12 July 2018

    Setup Linux Root Server

    by kerner1000

    Log-in via ssh

    ssh root@ip
    

    Create a user

    adduser username
    

    Add user to the sudo group

    usermod -aG sudo username
    

    Enable login via ssh key for a user

    On a client, generate a key pair

    then, copy the key to the server:

    ssh-copy-id -f -i users-key-file_rsa.pub username@ip
    

    Disable login via password

    Enable unattended upgrades

    apt-get update
    apt-get install unattended-upgrades
    

    ‘unattended-upgrades’ comes already with a good default configuration. No further steps required.

    tags: terminal