reverseproxy_ssh_setup 255 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #!/bin/sh set -e port="$1" # switch SSH to port $port sed -i -e 's/^#\?\s*Port\s*[0-9]\+\s*$/Port '$port'/g' /etc/ssh/sshd_config # Tell SELinux to allow the new port semanage port -a -t ssh_port_t -p tcp "$port" # Restart SSH systemctl restart sshd