Guide to Centos Installation and Root Access on CloudStack

Introduction After installing the Centos operating system on CloudStack, you usually log in with the username centos. However, in some cases, root access may be required. This guide explains step-by-step how to log in to the system with the centos user, obtain root access, and optionally create a password for the root user.

Step-by-Step Guide

  1. Log in with the Centos User:

    • Connect to the Centos server you created in the CloudStack console using SSH or VNC.
    • Log in using the username centos and your password.
  2. Root Access with the Sudo Command:

    • Run the following command in the terminal:
      Bash

      sudo -s
      
    • This command gives you root privileges. You can now run commands as the root user.
  3. Create a Root Password (Optional):

    • Why Create a Root Password: For security reasons, it’s important to create a password for the root user. This prevents unauthorized access to the root account.
    • Create Password:
      Bash

      passwd
      

      This command will prompt you to enter a new password. Make sure you create a strong password.

  4. Direct Login with the Root User (Optional):

    • SSH Configuration:
      • Open the SSH configuration file:
        Bash

        nano /etc/ssh/sshd_config
        
      • Find the following line and change the value to yes:
        PermitRootLogin yes
        
      • Save the file by pressing Ctrl+X, then Y, and Enter.
      • Restart the SSH service:
        Bash

        systemctl restart sshd
        
    • You can now log in directly to the system using the root username and the new password you created.

Important Notes:

  • Security: Be careful with root privileges. Incorrect commands can crash your system.
  • Sudoers File: If you have multiple users on your system, you can edit the sudoers file to define which users can run which commands.
  • SSH Key: We recommend using SSH keys for a more secure login.
  • Strong Password: Create a strong and unique password for the root user.

Web Hosting vs. Windows Hosting: What’s the Difference?

Web hosting refers to the service of storing all the files and data of a website on a server that is connected to the internet. When users visit your website, they access the files on this server. Web hosting typically runs on Linux-based operating systems and supports a wider range of software and programming languages.

Windows hosting, on the other hand, runs on the Microsoft Windows operating system. It is ideal for web applications developed with Microsoft technologies such as ASP.NET and .NET Core. Windows hosting often offers more specialized and customizable solutions, catering more to the needs of businesses and organizations.

Key Differences Between Web Hosting and Windows Hosting

Feature Web Hosting (Typically Linux) Windows Hosting
Operating System Linux (Ubuntu, CentOS, etc.) Windows Server
Supported Software PHP, Python, Perl, MySQL ASP.NET, .NET Core, MSSQL
Use Cases Wide range of uses (blogs, e-commerce sites, personal websites, etc.) Specifically for applications developed with Microsoft technologies (enterprise websites, intranets, etc.)
Performance Generally higher performance Optimized specifically for Microsoft applications
Security High security standards High security standards, but with specific security features for the Microsoft ecosystem
Price Generally more affordable More expensive (especially for custom requirements)

Which Hosting Type Should You Choose?

  • If your website is developed with PHP, Python, or Perl: Web hosting may be more suitable for you.
  • If your website is developed with ASP.NET or .NET Core: Windows hosting would be a better choice.
  • If you need high performance and custom customization options: Windows hosting may be a better option.
  • If your budget is limited: Web hosting may be a more affordable option.

Conclusion

Web hosting and Windows hosting offer different solutions for different needs. Choosing the right hosting type based on your website’s technology and requirements is crucial for your site’s performance and security.

Changing the RDP port in Windows Server 2012, 2016, 2019, 2022

This manual covers the procedure for changing the RDP port in Windows Server 2012. Please note that all further procedures are designed to change the RDP port, which will lead to the disconnection of the current server connection; therefore we recommend using other options for connecting to the server (e.g. through the Web console in your hosting account). In order to accomplish this task, you need to edit the registry of the operating system. The registry may be edited using the relevant program editor.

Click Start and type cmd in the Search field.

windows server 2012 comand prompt

In the black console window that appears, type in and execute the regedit command.

windows server regedit

In the registry editor, it is necessary to find the RDP-Tcp partition, which can be done using following this path

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp:

windows server regedit port number

It is then necessary to find and open the PortNumber element (as on the figure above) in it.

Next, switch to the Decimal input format and specify a new port for the RDP connection:

windows server edit port number

When selecting a new port for connection, remember that there are several port categories broken down by their numbers:

  • Numbers from 0 to 10213 are known ports that are assigned and controlled by Internet Assigned Numbers Authority (IANA).
    They are normally used by various OS system applications.
  • Ports from 1024 to 49151 are registered ports designated by IANA. They can be used to solve particular tasks.
  • Port numbers from 49152 to 65535 are dynamic (private) ports that may be used by any applications or processes to solve work tasks.

Port rule

After changing a port for remote connection, it is necessary to open it in the firewall settings, otherwise all attempts of external connection will be blocked. To do this, it is necessary to use the Windows Firewall with Advanced Security snap-in. You can open it by going to the menu: Server manager —> Tools:

windows server  manager tools

It is necessary to select “Inbound Rules “, right click on this item and select “New rule“:

windows server  firewall inband rules add new

We will create a rule for the port:

windows server  firewall inband rules type

It is necessary to select protocol type (TCP or UDP) and specify the port that we set when editing the registry (in our example: TCP protocol, 60000 port number):

windows server new port input

The next step is to select the type of action that describes the rule. In our case, it is necessary to enable the connection using the specified port.

windows server  allow connection

The next step is to specify the scope of the rule – it depends on where the server is running (in a workgroup, domain or private access):

windows server  firewall rule profile

Then it is necessary to select a name for the rule (it is recommended to select the name in such a way that the rule can then be easily recognized among others):

windows server  firewall naming and finish

After that the server has to be rebooted.

Now the new new port needs to be used to connect to the server via RDP.

What is VDS Hosting?

VDS (Virtual Dedicated Server) is a type of hosting where a physical server’s resources are divided into completely isolated partitions using virtualization technology. This provides each user with a dedicated virtual server.

Why choose VDS Hosting?

  • Independence: Since there is no resource sharing with other users, your performance is not affected by other sites.
  • Control: You can install your own operating system, install your own software, and have full root access to your server.
  • Security: Since there is no resource sharing with other users, the security risk is lower.
  • Scalability: You can easily increase or decrease your resources as needed.
  • Performance: Offers higher performance and lower latency compared to shared hosting.

How does VDS Hosting work?

A physical server is divided into multiple virtual servers using virtualization technology. Each virtual server acts like a separate computer running its own operating system and independent of other virtual servers.

Who is VDS Hosting suitable for?

  • Medium-sized businesses: Ideal for medium-sized businesses looking for more control and flexibility.
  • High-traffic websites: A suitable option for high-traffic websites that want to overcome the limitations of shared hosting.
  • E-commerce sites: Ideal for e-commerce sites with high security and performance expectations.
  • Developers: Provides a reliable and flexible environment for developing and testing applications.

Advantages of VDS Hosting:

  • High Performance: Offers faster and more stable performance as there is no resource sharing with other users.
  • Security: Lower security risk due to its isolated environment.
  • Flexibility: You can customize it to your needs.
  • Scalability: You can easily scale up or down.
  • Full Control: You have full control over your server.

Difference between VDS and VPS:

While VDS and VPS are often used interchangeably, some providers may have slight differences. In general, VDS can be considered a more advanced and customizable version of VPS.