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
ie Windows style new line character after every command you issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.