Solaris : Configure to network service ( e.g. telnet) to listen different port other than default one
If you want to make a TCP application bind to a different port instead of standard port then here is what you do. This will enable to telnet to a machine only if you know the port number.
1. vi /etc/services file and edit the line for telnet
change this line to
where 12121 is port number that it is going to listen for telnet requests.Make sure that you use port number bigger than 1k (1024 bytes) as the ports less than 1K are reserved ports.
2. Kill inetd daemon and restart it or do HUP on it.
% ps -ef | grep inetd
% kill -HUP
3. Telnet to the client by specifying port number to connect to this machine.
% telnet hostname 12121