I am not able to access Amazon EC2 instance via ssh as i am behind a firewall. So, i thought of running ssh on port other than 22, like 80 or 443.
I tried starting A
Here is what I came up with to run sshd on 443 and 22 having rhel8 on ec2
tcp 443 1.2.3.4/32 #allow access to 443 from IP 1.2.3.4
tcp 22 1.2.3.4/32 #allow access to 22 from IP 1.2.3.4
#install semanage with
sudo yum install -y policycoreutils-python-utils
#delete 443 from http ports
sudo semanage port -d -t http_port_t -p tcp 443
#add 443 to ssh ports
sudo semanage port -m -t ssh_port_t -p tcp 443
Port 22
Port 443
sudo service sshd restart