If you are using Vesta Control Panel, you need to make two modifications to change the SSH port.
1. Open the file '/etc/ssh/sshd_config' in an editor. Uncomment the line having the port number and change the port number.
E.g.
port 1234
Restart the SSH server by running the following command:
systemctl restart ssh
2. On the Vesta Control Panel, click on the Firewall and then edit the line that has '/SSH'. In the textbox for the port, enter the desired port number.