1. Disable ping

Edit configuration file: /etc/sysctl.conf, add configuration information

            net.ipv4.icmp_echo_ignore_all=1

Execute command "sysctl -p" to activate configuration



2.  Change ssh port

Edit configuration file: /etc/ssh/sshd_config , modify parameter Port(Parameter range 1024-65535, changed to a value that is not easy to guess)

            Port 2222

Execute command "systemctl restart sshd.service" to activate configuration