I am using following configurations for connecting:
{
host: '192.168.10.28',
port: 23,
shellPrompt: '=>',
timeout: 1500,
loginPrompt: '/Username[: ]*$/i',
passwordPrompt: '/Password: /i',
username: 'clearone',
password: 'converge'
}
When I am trying to connect from Telnet in Windows/PuTTY, it's working fine and the output of the connection is as follows:
I think I am missing a configuration/parameter. Here is the link of the library I am using: https://www.npmjs.com/package/telnet-client.
In your configurations add this:
"ors":"\r\n"
Explaination:
In telnet-client node library the default Output Record Separator is \n
which is not working out in your case as your telnet server seems to be accepting a \r\n
i.e. Windows style new line character after every command you issue.