Tuning SSH
SSH is the definitive way of communicating with your system. It is a vital service to the lifeblood of your system and it maintains a single, system-wide configuration file that enables the system administrator to modify the operation of the daemon.
SSH access is generally given using the following syntax:
# ssh username@ipaddress
However, if things are particularly slow, the first step in troubleshooting your system is to use the alternative debug mode like this:
# ssh username@ipaddress -vvv
So with this in mind, let's take a closer look at this file to assist you in the process of troubleshooting the sshd
daemon as a whole.
We will begin by opening the following file in our favorite text editor:
# nano /etc/ssh/sshd_config
Seen as a good practice when dealing with dictionary attacks, scanners, or bots, you can change the SSH port by simply replacing the value #Port 22
with something completely different, such as Port 2222
.
You can also restrict the root login (this is always recommended...