-
Connecting to your VPS
The first step after getting your VPS is to connect to it.
There are different ways to connect to your VPS depending on your OS.
For Windows users, you can connect to your VPS using PuTYY . For Linux and Mac users, you can connect using the terminal
-
Update your server.
To update your Ubuntu VPS, run the following command.
apt-get update && apt-get upgrade -y
This command will update all your system packages to their latest versions.
Updates should be done regularly. You can also enable automatic updates so that you don’t do it manually.
-
Secure your Server.
Your server security is of utmost importance.
To ensure your server is secure, you can do the following:
-
Enable two factor authentication
This means you will need a code that’s sent to your phone in order to log in to your VPS.
Enabling 2FA will prevent other users from logging in to your VPS.
For more details on how to set up 2FA for Ubuntu 16.04 check here
-
Use SSH Keys
Using SSH keys is another way to prevent unwanted access.
It will prevent anyone from logging in to your server without a unique combination of a private key and a public key.
For details on how to use SSH keys check our other guide
-
Use a Strong Password
Using a strong password is the most basic and most important aspect of your server’s security.
Make sure you:
– use at least 8 characters for your password
– use one special character and/or numeric
– Use a combination of lower and upper case letters
You can also use the command line to generate a password
A combination of SSH keys, 2FA authentication and a strong password will ensure maximum security when it comes to authorized access to your server.
-
Change Default SSH port
The default SSH port is 22. It is also the most common port that gets attacked.
Although it’s still possible to know the ports your server is using, changing it from the default port can prevent some attacks.
-
Set up a firewall
There are several ways of setting up a firewall for your server.
You can use IP tables or UFW.
Check out our guides on how to configure iptables and UFW
Follow the guides keenly because misconfiguring your firewall can block you out of your server and it can also block all traffic to your website.
Other things you can do with your Ubuntu VPS includes:
-
Back up your server
-
Set up monitoring
-
Use a control panel
-
Set up a mail server
-
Install FTP server
-
Install applications you need
And of course don’t forget to explore and have fun.