echo -e "\e[40;38;5;82mThe SSH Port replacement process begins....\e[0m";
echo -e "\e[40;38;5;82m...\e[0m";
read -p $'\e[1;44mEnter the new SSH Port? (By default: 2220)\e[0m: ' sshportu
if [ -z "$sshportu" > 0 ]
then
 sshportu='2220';
fi
yum install nano -y
sed -i "s/#Port 22/Port $sshportu/g" /etc/ssh/sshd_config
sudo yum install -y policycoreutils-python
sudo yum install -y policycoreutils-python-utils
sudo semanage port -a -t ssh_port_t -p tcp $sshportu
firewall-cmd --permanent --zone=public --add-port=$sshportu/tcp
plesk_check=`firewall-cmd --get-zones`
if [[ "$plesk_check" == *"plesk"* ]]; then
  echo "Plesk Panel icin ozel kural eklendi"
  firewall-cmd --permanent --zone=plesk --add-port=$sshportu/tcp
fi
firewall-cmd --reload
sudo systemctl restart sshd.service
ss -tnlp|grep ssh
echo -e "\e[40;38;5;82mNew SSH Port $sshportu has been actived."
echo -e "Teklan.com.tr internet services...\e[0m";
echo -e "good works ans stay happy.\e[0m";