Hostwinds Tutorials

Search results for:


Table of Contents


How Can I Secure My Linux Server?
Changing The SSH Port
Create A Second User That Is Not Root
Restrict Access To The Root User(s), Either Through
Disable Password Authentication For SSH And Enable Key Based Authentication
Creating A User From The Command Line Or Shell

Linux Server Security Best Practices

Tags: Linux,  Security 

How Can I Secure My Linux Server?
Changing The SSH Port
Create A Second User That Is Not Root
Restrict Access To The Root User(s), Either Through
Disable Password Authentication For SSH And Enable Key Based Authentication
Creating A User From The Command Line Or Shell

How Can I Secure My Linux Server?

Several measures can be taken to secure your server in the best way possible to mitigate malicious issues.  Below you'll find some of the best practices to apply when securing your Linux servers for your Hostwinds Cloud VPS or Dedicated Server.

Changing The SSH Port

Create A Second User That Is Not Root

Restrict Access To The Root User(s), Either Through

  • IP Address
  • Or disable access entirely

Disable Password Authentication For SSH And Enable Key Based Authentication

Creating A User From The Command Line Or Shell

Step 1: Open a shell prompt.

Step 2: If you are not logged in as root, type the command below and enter root password.

su –

Step 3: Type the command below followed by a space and the username for the new account you create at the command line (for example, useradd jdoe ). Press [Enter]. Often, usernames are variations on the user's name, such as jdoe for John Doe. User account names can be anything from the user's name, initials, or birthplace to something more creative.

useradd <username>

Step 4: Type passwd followed by space and the username again (passwd jdoe ).

passwd <username>

Step 5: At the New password: prompt enter a password for the new user and press [Enter].

Step 6: At the Retype new password: prompt, enter the same password to confirm your selection.

If you need further assistance securing your Linux server, please reach out to us by Opening A Support Ticket.  We will be happy to help you add increased measures above and beyond the ones listed here.

Written by Michael Brower  /  December 13, 2016