The telnet server port command changes the port number that a Telnet server monitors.
The undo telnet server port command restores the port number that the Telnet server monitors to the default value.
By default, the Telnet server monitors the port number 23.
A Telnet client can log in successfully with no port specified only when the server is monitoring port 23. If the server is monitoring another port, the port number must be specified upon login.
The telnet server port command changes the IPv4 and IPv6 port number that a Telnet server monitors.
After the monitoring port number is changed, all connections are disconnected and the server starts to monitor new port numbers.