Skip to content

Very simple Telnet server written in C#. You can add your own commands and enable password control for connecting to the telnet server. Very useful simple library that can be used for adding remote control support to background services and applications.

Notifications You must be signed in to change notification settings

nthdeveloper/NthTelnetServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nth Telnet Service

Very simple Telnet server written in C#. You can add your own commands and enable password control for connecting to the telnet server.

Features

  • Very simple, can be used with only two lines of codes
  • Supports multiple client connections at the same time
  • Supports password protection
  • Customizable Telnet prompt
  • Built in help and exit commands
  • You can add your own commands only by implementing a simple command interface

How to use

  • The simplest way
//Create the TelnetService object
TelnetService _telnetService = new TelnetService(new TCPServer(), new ITelnetCommand[0]);

//Start with default settings
_telnetService.Start(new TelnetServiceSettings());
  • Start with custom settings
TelnetService _telnetService = new TelnetService(new TCPServer(), new ITelnetCommand[0]);

TelnetServiceSettings _telnetSettings = new TelnetServiceSettings();
_telnetSettings.PromtText = "SampleApp@" + Environment.MachineName;
_telnetSettings.PortNumber = 32202;
_telnetSettings.Charset = Encoding.Default.CodePage;
//Other settings..
_telnetService.Start(_telnetSettings);
  • Add custom commands

You can pass your custom commands to the TelnetService as a constructor parameter

TelnetService _telnetService = new TelnetService(new TCPServer(), 
new ITelnetCommand[]
{
    new HelloCommand(),
    new EchoCommand()
});

Sample console screenshots

  • Help command usage

Help command usage

  • Custom command usage with no parameters and one parameter

Help command usage

About

Very simple Telnet server written in C#. You can add your own commands and enable password control for connecting to the telnet server. Very useful simple library that can be used for adding remote control support to background services and applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages