Prepare A Basic Ubuntu Server Select Image Create Droplet

Prepare A Basic Ubuntu Server

Interested in a do it yourself project? This guide will show you how to prepare a basic Ubuntu server as a foundation. In the future, you may want to start your own blog, a photo gallery, social network, community forum or even a private site for your family. Are you ready to dive right in? Before we get started, make sure you sign up for a new account through our link and get your $10 credit which is equal to two months of free service on the 512MB plan!

Once you login to your account:

1-click on CREATE
2-choose a name and enter it into the box under Droplet Hostname
3-select the lowest size which is 512MB
4-default Region (New York)
5-default Image (Ubuntu 14.04 x64)
6-finally at the bottom, click on Create Droplet

An automated email will be dispatched to you with the account details.

Let’s remotely connect to the server IP address provided in the email by opening terminal and typing in: ssh
make sure to replace with the actual IP address you were assigned.

Once you connect, the first thing you want to do is to change the password that was provided to you by typing the following command: passwd

Use at least 8 characters that includes numbers, letters and special characters and confirm.

Secure your account

For security reason, we do not want to use the root so let’s create a new user with the command adduser followed by the name. For example, we can create johndoe using the command: adduser johndoe

Once again, set a password and the rest of the details are optional. Simply hit the enter key to go through each one.

Let’s give administrative privileges to the newly created account with the command: visudo

Scroll down until you see: # User privilege specification and just below that, it should show: root ALL=(ALL:ALL) ALL

Copy and paste it to a new line below it and then change root to the name you used above. We’ll use johndoe as an example again, so the end result will look like this:

# User privilege specification
johndoe ALL=(ALL:ALL) ALL

Press CTRL X on your keyboard to exit and then type Y and then press the enter key to save the file.

Now let’s go ahead and give our new account SSH access as well as restrict the root account by modifying the configuration file.

Type: nano /etc/ssh/sshd_config

First we restrict the root account. Scroll down until you see PermitRootLogin yes and then change it to match this: PermitRootLogin no

Below that, let’s give the new user (in our case johndoe) access to SSH. Type in: AllowUsers johndoe

Make sure you enter the name of the user you created earlier or you will lock yourself out.

Press CTRL X and type Y to save the file and then to restart the SSH service, type: service ssh restart

Congrats! You configured your new server. You can now connect with your username and IP address. For example, we’ll connect using our johndoe account and it looks like this: ssh

We’re here to help!

Leave a comment if you encounter any issues or have any questions.