Try to set the configuration of the TCP/UDP Service. It is not the PAM side reason but the parameter of the TeraTerm side.
Port: 23:*
Application protocol : TELNET
Client application: "C:\Program Files (x86)\teraterm\ttermpro.exe" telnet://<Local IP>:<First Port> /T=1
Reference) TeraTerm Pro command line
The TeraTerm is the terminal emulator. See the TeraTerm Homepage to check it.