December 2018
Beginner
826 pages
22h 54m
English
We're going to start with a simple one, that is, changing the default port on which the SSH daemon runs:
# If you want to change the port on a SELinux system, you have to tell# SELinux about this change.# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER##Port 22#AddressFamily any#ListenAddress 0.0.0.0#ListenAddress ::
Change the preceding code so that the Port line is uncommented and now reads 2222:
#Port 2222#AddressFamily any#ListenAddress 0.0.0.0#ListenAddress ::
As the handy note before this block informs us, we also have to modify SELinux so that it's aware that the SSH daemon will be trying to use a different port.
This file suggests that we use semanage, so let's do just that.
First, we'll find which package ...
Read now
Unlock full access