From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment

Unlock this course with a free trial

Join today to access over 24,300 courses taught by industry experts.

The sshd_config file

The sshd_config file

- To secure our SSH server, we're going to make modifications to the sshd_config file. If you look at the slide here, you'll see that we have our SSH server and we have the configuration path, which is /etc/ssh, and we have our main configuration file inside of that, which is sshd_config. Before you make any configuration changes, make sure that you back up the sshd_config file before modifying. So let's go to our Debian server, that's what I'm going to be using for the SSH security lab. We'll change over to /etc/ssh, and we see the content in there. And so let's take a look at sshd_config, and you'll note that we've been here before. In fact, a couple times. We changed the port a couple times to make, one, the system become degraded, and two, to show how it works with SELinux. So this is the main configuration file that you'll work with for SSH. I'm going to close out of this, and we'll do our backup right now. And so we'll do a copy of sshd_config, and we'll call that…

Contents