From the RouterOS command line move to /ip service and issue the print command this will display port numbers for various services and which of those services are currently enabled. I will also cover how to disable the services if you wish, the output below is from a recent RouterOS install.
1 | [admin@MikroTik] /ip service> print |
From /ip service set the new SSH port number. Pick a number you like or you can use the following list https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers.
1 | [admin@MikroTik] /ip service> set ssh port=2987 |
The change takes effectively immediately.
Disabling a service is equally easy just type disable followed by the service name. It’s always a good idea to disable unused services. Below I’ve disable three different services.
1 | [admin@MikroTik] /ip service> disable telnet |
1 | [admin@MikroTik] /ip service> disable ftp |
1 | [admin@MikroTik] /ip service> disable winbox |
Issue the print command to verify the port change, note that certain services have a X in front of them indicating the service has been disabled.
1 | [admin@MikroTik] /ip service> print |
— Apr 24, 2016