The file /etc/services
contains the IANA assigned port numbers and there is not a single technical requirement to modify that file to be able to you run your services on a non-standard port. When you want a non-default port typically you can numerically set that port number in a service configuration file or with a start-up option.
I would also find it hard to diagnose why a service is not listening on its default port, when the non-standard port is not explicitly set in the start-up script or server configuration file, but taken from a modified /etc/services
.
If you did change /etc/services
to reflect your non-standard port number, please don't use an established service name such as ssh
on your custom port as that might break connectivity when connecting to other system from yours.
You'll be hard-pressed to diagnose why ssh otherhost
suddenly fails to connect when on that otherhost TCP/IP port 22 is open...
.
lmtp
just based on how that protocol is used (locally, as the name implies). They also do document both approaches.