Knowledge Base

Your Go-To Resource for Expert Insights and Solutions

Knowledge Base

How to Create a New User and Add Them to Sudoers

In this tutorial, we will guide you through the process of creating a new user and giving them sudo privileges on a Linux system.

 

Step 1: Create a New User

To create a new user, use the useradd command:

Code copied to your clipboard!

Step 2: Set a Password for the New User

Next, set a password for the newly created user:

Code copied to your clipboard!

Step 3: Add the User to the Sudoers Group

To grant the new user sudo privileges, add them to the sudo group:

Code copied to your clipboard!

Step 4: Verify the User's Sudo Access

To check if the user has been added to the sudoers group successfully, use the following command:

Code copied to your clipboard!

Conclusion

You've successfully created a new user and granted them sudo privileges. The new user can now execute commands as a superuser by prefixing commands with sudo.

How to Install VNC on Ubuntu and CentOS: A Step-by-Step Guide

VNC (Virtual Network Computing) allows you to access a graphical desktop environment remotely. This guide will walk you through the installation of VNC on both Ubuntu and CentOS, as well as the steps to install a VNC client to connect to your server remotely. Follow the instructions below to set up a VNC server and client for secure and easy remote desktop access.

Why Use VNC?

VNC enables remote desktop sharing over a network, which is especially useful for managing remote servers or desktops without needing direct physical access. It's widely used for troubleshooting, administering systems remotely, and for accessing applications that require a graphical interface.

Installing VNC Server on Ubuntu

Follow these steps to install and configure the VNC server on your Ubuntu system:

  1. Update your system packages:
    Code copied to your clipboard!
  2. Install the VNC server (TigerVNC):
    Code copied to your clipboard!
  3. Create a password for VNC:

    Set a password for the VNC session so that only authorized users can access the remote desktop. Run the following command and enter your desired password:

    Code copied to your clipboard!
  4. Create a new systemd service for VNC:

    To ensure that VNC runs automatically after a reboot, create a systemd service by creating a new service file in the following location:

    Code copied to your clipboard!

    Enter the following content in the service file (replacing 'your-user' with your username):

    Code copied to your clipboard!
  5. Start and enable the VNC service:
    Code copied to your clipboard!

Installing VNC Client on Ubuntu

To connect to the VNC server from your local machine, you need to install a VNC client. You can use TigerVNC Viewer or RealVNC:

  1. Install the VNC client (TigerVNC Viewer):
    Code copied to your clipboard!
  2. Connect to the VNC server:

    Run the following command to connect to the VNC server (replace 1 with the port number and your-server-ip with the server's IP address):

    Code copied to your clipboard!

Installing VNC on CentOS

To install VNC on CentOS, follow the steps below:

  1. Update your system packages:
    Code copied to your clipboard!
  2. Install the VNC server:
    Code copied to your clipboard!
  3. Configure the VNC server:

    Edit the configuration file for VNC by creating a custom configuration for your user:

    Code copied to your clipboard!
  4. Start the VNC server:
    Code copied to your clipboard!

Conclusion

VNC is an excellent solution for remote desktop access, and by following this guide, you should now have it installed and configured on both Ubuntu and CentOS systems. You can now connect to your server's desktop interface using a VNC client and manage your system remotely.

How to Change Your SSH Port Number to Avoid Attacks and Improve Security

SSH is one of the most common ways to access and manage servers. Unfortunately, its popularity also makes it a frequent target for hackers. By default, SSH runs on port 22, which is widely known and often scanned by attackers. But what if we told you that changing your SSH port number could dramatically improve the security of your server?

In this article, we’ll show you how to change your SSH port number and hide it from potential attackers, making your server more secure and less vulnerable to brute force and automated attacks.

 

Why Change Your SSH Port Number?

The default SSH port number (22) is a well-known target for attackers. It's the first port that malicious actors will try when attempting to gain unauthorized access to your server. By changing the port number to something more obscure, you make it more difficult for attackers to find and exploit your SSH service.

Changing the SSH port adds an extra layer of security by preventing automated scripts and brute-force attempts that typically target port 22. It’s a simple change, but it can greatly enhance the overall security of your server.

Step-by-Step Guide: Changing Your SSH Port

Follow these steps to change your SSH port number and increase your server's security:

  1. Log in to your server as root or a user with sudo privileges
  2. Open the SSH configuration file for editing:
    Code copied to your clipboard!
  3. Find the line that specifies the default SSH port. It will look like this:
    Code copied to your clipboard!
    Remove the "#" symbol to uncomment the line, and then change the port number to your desired value (for example, 2222, 2200, etc.):
    Code copied to your clipboard!
  4. Save the changes and close the file: Press CTRL + X, then Y to confirm changes, and hit Enter to save the file.
  5. Adjust your firewall rules to allow the new port: If you're using UFW, run the following command to allow traffic on your new port (replace 2222 with your port number):
    Code copied to your clipboard!
    Don't forget to remove the old rule for port 22:
    Code copied to your clipboard!
  6. Restart the SSH service to apply the changes:
    Code copied to your clipboard!
  7. Test the new SSH port by opening a new terminal window and trying to connect to the server with the new port:
    Code copied to your clipboard!
    Make sure you can log in successfully before closing your current SSH session.

Remember: Never Lock Yourself Out!

Before closing your SSH session, always make sure you can log in using the new port. Test the new connection in a separate terminal window to confirm that the change was successful and that you're not locking yourself out of the server.

Can I Change My Port Back Later?

Yes, you can always change your SSH port number back to 22 if necessary. Just follow the same steps, but revert the port number to 22. Remember to adjust your firewall rules and restart SSH after making the changes.

Can I Migrate My Hosting to Oxerv?

Thinking about moving your website to a better, more reliable hosting provider? At Oxerv, we make the transition easy, seamless, and best of all, free of charge! If you're currently using cPanel with your hosting provider, we can migrate your entire website to our hosting platform with zero downtime and absolutely no hidden fees.

 

Why Migrate to Oxerv?

We understand that finding the right hosting provider can be overwhelming. With Oxerv, you get a dependable, secure, and fast hosting service tailored to your needs. Whether you're running a personal blog or a full-fledged eCommerce site, we have the tools, support, and infrastructure to help you grow.

One of the best parts about migrating to Oxerv? We take care of everything. Our goal is to ensure that your website's migration is smooth, easy, and most importantly, free of any downtime. You don’t need to worry about any interruptions—just a seamless transition to better hosting!

How Does the Migration Process Work?

If you're already using cPanel hosting, the migration process couldn't be simpler. By granting us access to your current cPanel account, we handle the entire migration for you—at no extra cost. Our expert team will securely transfer all your files, databases, and settings to our servers while ensuring that there’s absolutely no downtime for your website.

Once we have access to your cPanel, our migration specialists will take care of everything from start to finish, making sure your website is fully operational on Oxerv's platform. And the best part? We won't disrupt your services during the migration—your website will stay live the entire time!

What’s the Catch?

There’s no catch! Our migration service is completely free for websites hosted on cPanel. However, please note that we currently only offer free migration for cPanel hosting environments. If your hosting provider doesn't offer cPanel, we unfortunately cannot migrate your site for free, but we're always here to discuss other migration options!

Ready to Migrate?

With Oxerv, you get more than just web hosting—you get a team that truly cares about your website’s success. Whether you're running a small blog or a large business, we ensure your migration to Oxerv is smooth and worry-free. All you need to do is grant us access to your current cPanel, and we’ll take care of the rest!

If you're ready to make the switch, our support team is standing by to help. Let's get started on the migration today—no downtime, no hassle, just a seamless move to Oxerv!

Here’s How You Can Get Started

It’s easy to kick things off! Follow these simple steps to initiate the migration:

  1. Contact Oxerv's support team to request your free cPanel migration.
  2. Provide us with the necessary login credentials to your current cPanel account.
  3. Our team will begin the migration process, keeping you updated along the way.
  4. Sit back, relax, and enjoy your new hosting experience on Oxerv—no downtime, no disruption!

Our support team is dedicated to making your migration as smooth as possible. Once you’ve migrated your website, you can look forward to a faster, more reliable hosting experience with Oxerv.

So, are you ready to experience the Oxerv difference? Migrate your cPanel hosting to us today—let us show you how easy it can be!

STAY TUNED
Image