Best Sever

Best Hosting Company in Nigeria - Domain, Hosting, Websites, SSL

The first step after you create a Linux cloud server should be to set the security on it. This crucial step must be performed on every server to prevent hackers from obtaining unwanted access. The result is a more secure environment that helps prevent you and your business from being hacked. Performing these basic steps and hardening the security on your server should make hackers give up and move on to a new target.

User management

By default on every Linux system, the root user is created as the first user. The root user should be used only for the initial configuration of the system and should then be disabled via Secure Shell (SSH). Disabling this root user via SSH makes it harder for a hacker to gain access to the system. Because the root user is created by default on every Linux server, hackers already have half the information they need to log in to your server if the root user is enabled via SSH. All they need to do is run any number of brute-force SSH attacks until the password hash is broken.

To avoid this situation, you must create a secondary user to use when you need to log in and administer the system. Each end user on the system should have their own login credentials for logging purposes. Depending on the actions that the end user will perform, they might need to have sudo permission to perform administrative actions. This section provides examples on how to add a user with sudo permission on both Debian- and Red Hat Enterprise Linux-based systems.

Password strength guidelines

Before you create any users, ensure that you use strong passwords that require a minimum length (and maybe even include expiration dates). Here are common guidelines advocated by proponents of software system security:

  • Use a minimum password length of 12 to 14 characters, if permitted.
  • Include lowercase and uppercase alphabetic characters, numbers, and symbols, if permitted.
  • Generate passwords randomly where feasible.
  • Avoid using the same password twice (for example, across multiple user accounts or software systems).
  • Avoid character repetition, keyboard patterns, dictionary words, letter or number sequences, user names, relative or pet names, romantic links (current or past), and biographical information (for example, ID numbers, ancestors’ names, or dates).
  • Avoid using information that is or might become publicly associated with the user or the account.
  • Avoid using information that the user’s colleagues or acquaintances might know to be associated with the user.
  • Do not use passwords that consist wholly of any simple combination of the aforementioned weak components.

Add a user (Debian and Ubuntu)

  1. Create a new user and set the user’s password:

    adduser {username}

  2. Give the new user permission to use sudo to perform privileged operations on the system. This new user will be your main user when logging in remotely and making changes to the server.

    a. Run the following command as root to edit the list of user permissions:

    visudo

    b. Add the following line directly after the line containing root ALL=(ALL:ALL) ALL:

    {username} ALL=(ALL:ALL) ALL

    c. Save and quit.

  3. Switch to the new user and test its permissions by using sudo to run a command that normally requires root access:

    su {username} sudo iptables -L

    You are asked to enter the new user’s password for verification before the command is executed.

If several lines about INPUT and OUTPUT appeared, the new user has sudo permissions and you can skip to the next section. You should log in with user instead of root whenever possible. Using sudo will help you avoid making inadvertent system changes, and your changes will be logged for future reference.

Add a user (Red Hat and CentOS)

  1. Create a new user with adduser and set the user’s password with passwd:

    adduser {username} passwd {username}

  2. Give the new user permission to use sudo to perform privileged operations on the system. This new user will be your main user when log in remotely and make changes to the server.

    a. Run the following command:

    Note: On some distributions, the text editor that system uses for visudo is vi. It’s not a user-friendly editor, so you may need to consult a vi tutorial for help.

    {username} ALL=(ALL) ALL

    c. Save and quit.

  3. Switch to the new user and test its permissions by using sudo to run a command that normally requires root access:

    You are asked to enter the new user’s password for verification before the command is executed.

If several lines about INPUT and OUTPUT appeared, the new user has sudo permissions and you can proceed to the next section. You should log in with this user instead of root whenever possible. Using sudo will help you avoid making inadvertent system changes, and your changes will be logged for future reference.

Generate an SSH key pair

For a login method that is more secure than using a password, create an SSH key pair to use with the user that you previously created. These instructions work with any Linux distribution.

Note: These instructions are for Linux and Mac OS X desktops. If you are connecting from a Windows desktop, follow the instructions in Generate RSA Keys with SSH PUTTYgen and Log in with a SSH private key on Windows to generate and add the SSH key pair.

Gel Heel Cups Plantar Fasciitis Inserts - Silicone Heel Cup Pads for Bone Spurs Pain Relief Protectors of Your Sore or Bruised Feet Best Insole Gels Treatment by Armstrong Amerika (Small)
Health and Beauty (Armstrong Amerika)
  • INSTANT HEEL PAIN RELIEF - Helps to Relieve Your Heel Pain & Discomfort from Sore Hurting Heels, Sore Feet, Plantar Fasciitis, Bone or Aching Heel Spurs, Achilles...
  • HELP YOUR TIRED FEET - Soft Gel Liners Won t Slip in Your Shoe or Boot. Boost Your Energy so You Can Perform at Your Best ALL DAY by Reducing Impact on Your Joints...
  • COMFORTABLE FOR YOUR DAILY WEAR - VALUE PACK of 3. Relieving Your Tired Throbbing Feet, Giving You Greater Arch Support. Protect and Cushion Your Sore Heels from...
  • MADE OF MEDICAL GRADE PREMIUM SILICON Ultra-lightweight, Premium Silicon Heel Gels Grip Pads Soften Impact on Your Sore Foot & Heels - Great for Running, Walking...
  • YOUR SATISFACTION is GUARANTEED or YOUR MONEY BACK, One Size Fits All, UNISEX Anti-Odor, Non-Toxic, Premium Gel Heel Cups

Related posts: