Initial Server Setup - Ubuntu

Difficulty: 1
Time: 15 minutes

Whenever you create a new server from a base OS image, there are a few steps you should complete to ensure your server is:

  • Secure
  • Running the latest software

Though these steps are basic, they can take a little while to complete - think of this article as a kind of introduction to best practices for being a server admin.

Note: These first few steps where you create an SSH key assume you haven’t yet created your first server yet. If you're a GoDaddy Cloud Server user and already have, you can take a snapshot of the server and then destroy it.

Set up SSH keys

SSH keys offer a secure and convenient way for you to log in to your server via SSH. The "key" portion in "SSH key" is a file stored on your computer, known as a private key. Only computers that have the correct private key can log in to the server via SSH; all others are denied.

This is much more secure than typical password authentication, which can be cracked with a "brute force" application that continually guesses passwords until it finds yours. Note that you should still set up a password with your SSH keys to provide another layer of protection.

How you set up an SSH key depends on your operating system:

Note: GoDaddy Cloud Server users should complete these steps before creating their servers.

Create your server

Now that you have your SSH public key stored in your account, you can create servers that will let you log in using it. Use one of the following sets of instructions based on your situation:

Situation Instructions
This is my first server Create a server
I took a snapshot earlier Create server from snapshot
I'm not using GoDaddy Cloud Servers Use your provider's documentation for creating servers

Note: GoDaddy Cloud Server users should be mindful to select your SSH key in the Security info section when creating the server.

Disable remote root SSH login

To ensure your server is as secure as possible, you should disable remote root account login. GoDaddy Cloud Server customers do not need to complete this step; we've already done it for you.

  1. Connect to your server via SSH (Mac/Windows)
  2. Open sshd_config:
    sudo vim /etc/ssh/sshd_config
  3. Add or edit the PermitRootLogin paramater to have a 'no' value:
    PermitRootLogin no
  4. Save file changes:
  5. Restart the SSH service:
    sudo service ssh restart

Update your software versions

Ensuring all of your software is updated prevents potential security compromises.

  1. Update software sources list:
    sudo apt-get update
  2. Upgrade all currently installed software on the system:
    sudo apt-get upgrade

Next step

Now that your server is secure and up-to-date, we have some additional optional steps you should complete.

Var den här artikeln till hjälp?
Tack för din feedback. Ring vårt supportnummer eller starta chattalternativet ovan om du vill prata med en medarbetare på kundtjänst.
Vi är glada att vi kunde hjälpa till! Finns det något mer vi kan göra för dig?
Det var tråkigt att höra. Berätta vad som var krångligt eller varför lösningen inte hjälpte dig med problemet.