-P
: specify a port number
The -P
option is used to specify the port number to connect to. If you have a Telnet server running on port 9696 of a machine instead of port 23, for example:
putty -telnet -P 9696 host.name
plink -telnet -P 9696 host.name
(Note that this option is more useful in Plink than in PuTTY, because in PuTTY you can write putty -telnet host.name 9696
in any case.)
This option is equivalent to the port number control in the Session panel of the PuTTY configuration box (see section 4.1.1).