Single

Allow ssh port on SELinux

Step 3: Allow new SSH port on SELinux

The default port labelled for SSH is 22.

$ semanage port -l | grep ssh
ssh_port_t                     tcp      22

If you want to allow sshd to bind to network port configured, then you need to modify the port type to ssh_port_t.

sudo semanage port -a -t ssh_port_t -p tcp 2200

Confirm that the new port has been added to list of allowed ports for ssh.

$ semanage port -l | grep ssh
ssh_port_t                     tcp      

2200, 22

Step 4: Open SSH port on Firewalld

It is always recommended to keep the Firewall service running and only allow trusted services.

sudo firewall-cmd --add-port=2200/tcp --permanent
sudo firewall-cmd --reload

暂无评论

发表评论

Warning: Undefined variable $user_ID in /www/wwwroot/wiki/wp-content/themes/boxmoe-dove--master/comments.php on line 49

Warning: Undefined variable $user_ID in /www/wwwroot/wiki/wp-content/themes/boxmoe-dove--master/comments.php on line 72

Warning: Undefined variable $user_ID in /www/wwwroot/wiki/wp-content/themes/boxmoe-dove--master/comments.php on line 107