When you are configuring SSH in order to change default port 22 into some random number, you will probably be prompted with an error that says: semanage command not found. This is quick way to successfully change SSH port.
Try these two following commands:
# yum provides /usr/sbin/semanage # yum whatprovides /usr/sbin/semanage
From the output, we see that policycore-utils-python-utils provides this package. Install the policycoreutils-python-utils package:
# yum install policycoreutils-python-utils # yum install policycoreutils-python
You now successfully can use semanage command on your CentOS 7.
If this post helped you solve your little problem, please take a look at other topics I write about here. Thank you anonymous friend 🙂