How to Change the Default SSH Port on Linux

In this tutorial, we will show you how to change the SSH default port in Linux, and go over why changing this default port is a good idea. IMPORTANT: Before we go any further, you should understand that this is not a solution that will prevent or deter a determined hacker to attack your SSH service. It is merely a measure to help you avoid the thousands of automated bots running all the time scanning vast ranges of IP space searching for standard SSH ports being open. Preventing a determined hacker from brute-forcing your SSH service is beyond the scope of this article.

SSH, also known as Secure Shell, is the most widely-used protocol for connecting to and managing Linux systems remotely. SSH offers strong encryption and authentication along with excellent customizability, and using SSH gives you the freedom of accessing a remote machine. You can run services and software as if you were physically using the machine, no matter where you are.

By default, SSH runs on port 22. Since this is common knowledge, this port often becomes a target for brute force attacks. Because this provides full access to your server’s OS, people with malicious intent will often target port 22 more than any other port. Changing the default SSH port will prevent automated attacks that don’t spend the time to rotate ports when targeting a Linux Server. To protect your server from a brute force attack, you should change the default SSH port to something else.

Read More

How to Multi-Task in Linux with the Command Line

How to Multi-Task in Linux with the Command Line
How to Multi-Task in Linux with the Command Line

One of the most jarring moments when moving from a Windows-based environment to using the command line is the loss of easy multi-tasking. Even on Linux, if you use an X Window system, you can use the mouse to just click on a new program and open it. On the command line, however, you’re pretty much stuck with what’s on your screen at any given time. In this tutorial, we will show you how to multi-task in Linux with the command line.

Read More

How to Change User Password in Linux

Linux Change User Password
Linux Change User Password

change user password LinuxWe will show you how to change user password in Linux. Changing user passwords in Linux could be one of the most common tasks you will have to perform while you are administering a multi-user server. This is a very simple task though and in this tutorial, we will show you how to change the user password on a Linux VPS regardless of which distribution you are currently using.

Read More

How to Deal with Huge (and Growing) Log Files in Linux

How to Deal with Huge Log Files in Linux

If you’ve managed a Linux server for any length of time, you’re familiar with the problem of log files. They can sometimes be difficult enough to even find in the first place, and then you’re sometimes confronted with a file that’s hundreds of MB in size (or even GB). Searching through it is a pain, and they can eventually even start eating up your storage space.

Read More

Linux Grep Guide for Advanced Users

Linux Grep Guide for Advanced Users

Anyone who’s administered a Linux server for a certain amount of time is familiar with the “grep” command. With Linux’s philosophy of “Everything is a file”, grep becomes crucial to traversing log files, configuration files, checking for certain errors in output files, and getting the number of matches. In this tutorial, I’ll show you a few advanced uses of grep that can still be pretty useful. These are not hard to find in the man pages, but they’re just an extension of grep’s default functionality.

Read More

How to Run Commands Simultaneously in Linux

How to Run Commands Simultaneously in Linux

Let’s say you’re editing a configuration file in the Linux “vi” editor, and suddenly need to look up some data in another file? On a regular GUI system, this wouldn’t be a problem. You just open the second file, check when you need, and then switch back to the first program. On a command line, it isn’t that simple. Executing a process via the CLI blocks further input on any other program. Take this sleep command, for example,:

Read More

How to Enforce Password Quality in Linux

How to Enforce Password Quality in Linux

One of the easiest ways to improve the security of your server is to ensure that everyone’s password meets a certain minimum length. There are, of course, other considerations like the mix of small and capital letters, numbers, and special characters. But a minimum password length gives you the most “bang for the buck”. Each additional character in a password increases its strength exponentially. In this article, we’ll show you how to enforce a minimum password length for all your users in Linux.

Read More