Setting your prompts |
The login, password and shell prompts are needed by the TelnetSession class in order to know when the telnet server is ready to accept data. By default the login prompt is "login:", the password prompt is "Password:" and the shell prompt is "$". If the prompts on your server are different than the default values then you will need to change these properties in the TelnetSession instance prior to establishing a connection.
Example
[C$]
// set login prompt
session.LoginPrompt = "user:";
// set password prompt
session.PasswordPrompt = "pass:";
// set shell prompt
session.ShellPrompt = ">";
[Visual Basic]
' set login prompt
session.LoginPrompt = "user:"
' set password prompt
session.PasswordPrompt = "pass:"
' set shell prompt
session.ShellPrompt = ">"