Shaaf's blog

A technical blog about Java, Kubernetes and things that matter

Howto setup ssh with selinux and firewalld

While running fedora, if you want to change the port for your ssh, just changing the firewall rules will not make a difference. If you are running selinux its important that you change the policy to allow a different port as well. I did learn it the hard way though, hopefully the following guide should be helpful. Lets start by an introduction to semanage. From man Description semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources.