Aarvi

Change SSH port on Centos 7

Open file using command

vi /etc/ssh/sshd_config

#Port 22

remove the # symbol and change the default port 22 and change it accordingly to your preference

save the file and exit

semanage port -a -t ssh_port_t -p tcp 2244 where 1234 is my ssh port

firewall-cmd --permanent --zone=public --add-port=1234/tcp

firewall-cmd --reload

systemctl restart sshd.service

Now telnet <server IP > port to make sure the ssh port is working before logging off from server

Aarvi server solutions Is a Web Hosting Support Company that has built a solid reputation for quality, reliability, and true professional service