Configuring the server

Let's start from the server opening the /etc/ssh/ssd_config file and checking the following configuration directives:

Port 22

Let's start with the port. The standard port for the SSH service is 22 , and it is at this value that most of the script kiddies around will probe your SSH daemon with some automated tools; so if you have a server publicly available, change the value to an unprivileged port such as 9527 . Thus, a lot of these attacks will simply be ineffective:

#ListenAddress ::#ListenAddress 0.0.0.0

If we need to bind the service to a specific address on our server, this is the directive we need to work on; we simply uncomment and fill in the appropriate value:

Protocol 2

We do not think to use version 1 of ...

Get Mastering Bash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.