Initialize Ubuntu Droplet in DigitalOcean

This is a simple instruction on how to initialize Ubuntu Droplet in DigitalOcean. We will use Ubuntu 16.04 32 bit in this case. We have to use a normal user instead of the root account. Normally the root account should be disabled. First, we have to add a user by executing the following command. Let’s assume the intended username is john. adduser john Then we need to add the above user account into sudo group by executing the following command. gpasswd -a john sudo Assuming you generated an SSH key pair using the previous step, use the following command at the terminal of your local machine to print your public key (id_rsa.pub): cat ~/.ssh/id_rsa.pub This should print your public SSH key, […]

Continue reading

Configure Linux Static IP Network Interface

Static IP configuration can be found in file /etc/network/interfaces. This applies to Debian or any derivatives such as Ubuntu. Edit the file /etc/network/interfaces using sudo command sudo pico /etc/network/interfaces Change the file content to be similar like below. Please ensure to look closely on iface eth0 section. You can change the IP address based on your preferred address. In case if you want to configure static IP in any virtual machine such as VirtualBox, you may need to adjust dns-nameservers manually

Continue reading

How to Disable Root Login in Ubuntu

It is better to disable root user login since allowing root user login is a major security concern in Linux system. You can use root login after logging in as another user. 1. Edit sshd_config file. sudo pico /etc/ssh/sshd_config 2. Search PermitRootLogin directive in that file and change PermitRootLogin to no. Example: # Authentication: LoginGraceTime 120 PermitRootLogin no StrictModes yes

Continue reading

How to Install Security Updates in Ubuntu

You should install all available security updates in order to protect against unauthorised access to your Linux/Ubuntu box. The commands can be found in the following. sudo apt-get update sudo apt-get upgrade –show-upgraded Please ensure to enter your root password since you are using sudo command that gains super access to your Linux system.

Continue reading