menu
  + 
    #### 
    Reliable web hosting for your business or personal sites. cPanel + Litespeed included on fast NVMe storage.
    Loaded features and overselling enabled plans to help grow your business. cPanel/WHM + LiteSpeed + NVMe.
    Fine-tuned and optimized for all WordPress sizes. No i/io limits, AccelerateWP + cPanel + LiteSpeed + NVMe.
    KVM VPS servers with NVMe standard. Fast setup. **Free VPS control panel included.**
    Enterprise grade bare-metal servers with **1G / 10G unmetered** options. Fast provisioning.
 / Knowledge Base
# How to generate a free hostname certificate with AutoSSL
## Knowledge Base
421
June 26, 2024
cPanel will automatically generate a free hostname certificate during nightly maintenance as long as the hostname resolves to the Main IP address of the server. However, you’re welcome to use the following procedure to manually generate the certificate if you need it sooner.
If you need to replace a third-party certificate with a free hostname certificate, you can remove the third party certificate with the following steps:
1. Login to WHM as the root user.
2. Navigate to: “*Home »Service Configuration »Manage Service SSL Certificates.*“
3. Click on the “*Reset*” link to remove the existing certificate and replace it with a self signed certificate.
In order to install the free hostname certificate use the following steps:
1. Login to the server via SSH or Terminal as the root user.
2. Issue the following command:
```
/usr/local/cpanel/bin/checkallsslcerts
Documentation:
source: <
Tags: , 
1
Share Feedback
email
 Submit
previous article
#### 
next article
### Leave a Reply 
You must be  to post a comment.
* cPanel
* Control Panels
* Linux Tips
* Monitoring
* Operating Systems
* Random Stuff
!
The **LOGICWEB** logo is a registered trademark of LogicWeb Inc. All rights reserved. © 2024
**Company**
**Policies**
**Support**
# How to Recover Deleted Files in Linux
13001
July 30, 2023
## Table of Contents
1. 
2. 
   1. 
Losing data is one of the most unsettling and harrowing experiences that any user can go through. The prospect of not ever finding precious data once it is deleted or lost is what usually inspires anxiety and leaves users helpless. Thankfully, there are a couple of tools that you can use to recover deleted files on your Linux machines. We have tried out a few data recovery tools that can help you get back your deleted files and one that stood out among the rest. This is the TestDisk data recovery tool.
 is an opensource and powerful data recovery tool that, apart from recovering your data, rebuilds and recovers boot partitions and fixes partition tables. It recovers deleted files from filesystems such as FAT, exFAT ext3, ext4, and  NTFS to mention just a few, and copies them to another location. TestDisk is a command-line data recovery tool, and this is one of the attributes that sets it apart from other data recovery tools.
In this guide, we will demonstrate how you can recover deleted files in Linux using the Test disk utility tool. We will demonstrate how TestDisk can recover deleted data from a removable USB drive in Ubuntu 20.04.
## Step 1) Installing the TestDisk utility tool
The first step is to install TestDisk. To do so on Debian/Ubuntu distributions, update the package lists and install TestDisk as follows.
$ sudo apt update
$ sudo apt install testdisk
If you are running CentOS 8, RHEL 8, Rocky Linux 8, AlmaLinux 8, you need to , first , install EPEL repository.
$ sudo dnf install 
Next, update the system and install Test disk as follows.
$ sudo dnf update
$ sudo dnf install testdisk
Once installed, you can verify that Testdisk is installed by checking the version of TestDisk as follows.
$ testdisk --version
From the output, you can see that we have installed TestDisk 7.1 Now, let’s simulate how you can recover deleted files from a drive.
## Step 2) Recover deleted files using TestDisk
To demonstrate how you can recover files deleted from a Disk, we have deleted two files from a USB drive. The files are not even in the trash bin and our objective is to recover them.
You can have a similar setup where you have deleted a few files on your pendrive/ usb drive. To recover them, follow along.
On your terminal, run the following command to launch TestDisk
$ testdisk
Being a command-line tool, TestDisk provides a list of options as shown. By default, it highlights the most logical option to take as you get started out. So, press ENTER on the ‘create’ option.
The next screen presents you with the mounted volumes. However, to view all the disks and partitions, you need sudo permissions.
Therefore, using the arrow forward key, select ‘sudo’ and press ENTER.
NOTE: To avoid the hassle, you can simply run testdisk utility as a sudo user from the terminal.
$ sudo testdisk
Now, this time around, all the mounted partitions will be displayed. Select your preferred drive. In our case, we have selected out removable USB drive. Using the arrow forward key, select ‘Proceed’ and press ENTER.
TestDisk automatically detects the partition table type. For non-partitioned disks such as USB drives, a non-partitioned media type will be detected. So, press ENTER.
Your removable drive’s partition table will be listed as indicated. At the bottom, select ‘Undelete’
TestDisk scans your drive for undeleted files and highlights them in red.
To recover these files, you need to select them first. So, scroll down and type a full colon (:) for each selection. You will discover that each file is highlighted in green.
Now press SHIFT + C   for capital ‘C’ to copy the files. You will be prompted to select your preferred destination to save the files. In this example, we have chosen to save the files in the ‘Public’ directory. Once you have selected your directory, press ENTER.
The modification dates of the target directory will be displayed. You can choose any option, and once again, press ENTER.
TestDisk will notify you that the files have been successfully copied.
To confirm that the files have been copied, head over to the destination directory and confirm that the files exist.
The recovered files are saved with root permissions and ownership. You can change the permissions with .
$ sudo chown linuxtechi 'Cover letter.txt' 'How-to-get-CLIENTS-to-say-YES.pdf'
To exit TestDisk, press ‘q’ repeatedly until your finally go back to your bash shell.
#### Conclusion
That was a demonstration of how you can recover deleted files in Linux using the TestDisk utility. In case you have a hard disk that you want to recover files from or cannot boot entirely, simply remove the hard disk, and attach it to a USB adapter and plug it in a Linux system with TestDisk installed. We hope you have found this guide useful. We look forward to having your feedback.
Tags: 
# 5 Best Ways To Secure Your Linux Server
771
There are many ways to secure your Linux server. Today, cyber attacks and computer hacking can be prevented by bolstering security systems. By securing a Linux system, a computer is shielded from identity theft, data extraction, and other forms of malware. Different ways of securing a Linux system can teach users how to avoid spam, scams, and phishing campaigns. As a Linux developer, you should follow basic principles to increase privacy, security and stability. In this article, we’ll discuss the best ways you can secure your Linux system.
**Enable Full Disk Encryption**
Enable full disk encryption (FDE) to secure your Linux system. You should encrypt your entire hard disk regardless of which operating system you are using. This will ensure that your data remains secure if the device is stolen. First, take advantage of full disk encryption at install time if possible. By encrypting your hard disk, a criminal will be unable to extract your information without an FDE password. Encrypt your full disk so you don’t have to worry about temporary files, swap files, or other directories containing sensitive information. Furthermore, you will notice that encrypting your full disk allows your computer to function at a similar level of performance. Certainly, consider FDE as a cybersecurity tip to help .
**Keep Linux Software Up To Date**
Keep your software up to date to secure your Linux system completely. First, look into applying security patches. Check the Linux program and  to find helpful security tools that assist with updates. This will also make the upgrades between versions smoother. Moreover, review and apply the updates as soon as they become available. You might want to consider taking advantage of an RPM package manager to apply the security updates. Alternatively, consider applying updates through a cron job. Next, enable security notifications so you know the updates have been installed successfully. If you don’t want to be notified about the update process, configure unattended upgrades. Keep your software up to date to secure your Linux system.
**Vulnerability Scanning**
Vulnerability scanning is another way to ensure your Linux system is secure. Utilize JFrog’s open source binary Xray to implement advanced vulnerability scanning. Using this binary, you can continuously govern and audit all artifacts consumed and produced on your Linux system. Further,  Xray will ensure your Linux system is safe from malware by utilizing native artifactory integration, universal security compliance, and visibility impact analysis. In fact, you can scan all your artifacts and dependencies. This will provide unprecedented visibility, measuring the impact of any vulnerability or issues found in your software. Use the JFrog Xray as a a vulnerability scanning tool to secure your Linux system.
**Deactivate Network Ports When Inactive**
Another effective method for securing your Linux system is to deactivate network ports when you are not using them. First, use the “netstat” command so you know which ports are currently open or in-use. This will also inform you of which services are utilizing the open ports. Use different commands to close the services and ports you don’t need. Additionally, firewalls can help you automatically enable shut down guidelines. This is a great option if you use the same ports at relatively the same time each day. Next, change your SSH port from number 22 as that is the primary port hackers will look at to steal information. You are also making it more difficult for hackers to implement malware by changing the SSH port location. To secure your Linux system, deactivate network ports that you aren’t using.
**Create Strong Passwords**
Create strong passwords as the final way to secure your Linux system. First, make a password that is at least ten characters. Additionally, use special characters, uppercase letters and lowercase letters to complicate your password. This will make your password more difficult for hackers to decode. Vary your passwords by creating new ones for different users and software systems. After an extended period of time, remember to change your password to keep your Linux system secure. Moreover, consider looking into password managers if you have trouble keeping track of many different passwords. Pick the password manager that best meets your individual tech needs. To secure your Linux system, create .
There are many ways to secure your Linux system. First, enable full disk encryption to prevent hackers from installing malware on your Linux system. Then, keep your Linux software up to date to increase security. Deactivate network ports when they aren’t being used to prevent hackers from taking advantage of open ports. Utilize JFrog’s X ray to effectively scan for vulnerabilities. Finally, create strong passwords and change them after extended periods of time. These are the best ways to secure your Linux system.