Configure the Secure Shell Daemon to use a non-default port.
** Please ensure appropriate firewall rules are configured for SSH access
Deploy this script (requires existing VPS)
The settings below are requested when deploying the script:
SSH Port: |
Optional New port to be used for SSH connections |
---|
#!/bin/bash # <?env name="sshd_port" label="SSH Port" example="New port to be used for SSH connections" default="22" ?> function configure_ssh_port { sed -i "s/^Port .*/Port $SSHD_PORT/" /etc/ssh/sshd_config test -e /etc/init.d/ssh && /etc/init.d/ssh restart test -e /etc/init.d/sshd && /etc/init.d/sshd restart } configure_ssh_port