Change SSH Port - Ubuntu
-
vim /etc/ssh/sshd_configModify the Port to new port number (i.e: 23)
Port 23Restart ssh service
/etc/init.d/ssh restart
If not working, modify file below;
vim /etc/systemd/system/sockets.target.wants/ssh.socketModify the "ListenStream" value to target (i.e: 23)
Restart systemctl daemon & ssh service
systemctl daemon-reload /etc/init.d/ssh restartRef: https://askubuntu.com/questions/1483893/unable-to-change-ssh-port-on-ubuntu