How to write your own Telnet Server in VB5/6

This is a simple TELNET server supporting only one user and one comnection at a time. The Program can be enhanced for multiple user and for multiple users at a time.

The image below shows the interface to the Telnet client through the Microsoft Telnet program:

Telnet screenshot

Server Side Setup

Compile the supplied application and run it!

Client Side Setup

You can use the same machine or go to the other machine to test your server.

  • Go to the RUN prompt of your windows type TELNET.
  • In the telnet's Connect menu option select Remote System...
  • Now enter the ip address of the computer where your telnet server (demo application) is running in the Host Name option (or you can just enter your Computer Name)
  • Enter 23 or default value in the Host edit box
  • Press Enter

Yes, there comes your login screen. You can login to the sample telnet server using:

Login Name : sanjeev
Password : siri

Typing HELP at the prompt will give you a list of commands accepted by the client.

Download zipped project file (3k)


  • very nice for srudents

    Posted by Legacy on 01/15/2004 12:00am

    Originally posted by: mukesh bhootra

    it is very nice sir

  • Thank you!

    Posted by Legacy on 12/13/2003 12:00am

    Originally posted by:

    Awesome! I needed something as basic as this to help me with a project of mine that involves a telnet server. Good job.

  • how i can ?

    Posted by Legacy on 10/19/2003 12:00am

    Originally posted by: hanh

    i now working for a post office, alway contact to a telephone exchange ( neax61). i want to write my own program to connect to the telnet and implemente orders relating to telephone exchange. help me!

  • Very Useful - thanks a lot

    Posted by Legacy on 11/30/2002 12:00am

    Originally posted by: Madhu Gumma

    Very Useful - thanks a lot

  • I want to telnet for client.!

    Posted by Legacy on 07/27/2002 12:00am

    Originally posted by: lsjch

    I want to telnet for client.! giving me to ,

  • Very Useful - thanks

    Posted by Legacy on 07/04/2002 12:00am

    Originally posted by: Simon Ruffle

    Thanks for this code, it got me started on solving a problem that needed telnet access. I do not understand some of the criticism on this page...OK its simple, but it works, and can be used as a basis for onward developing code. I had this working within a minute or 2 of putting in the Google query "visual basic telnet server". It saved me time working out how to get the winsock control to work.

  • thnx d00d!

    Posted by Legacy on 06/19/2002 12:00am

    Originally posted by: Darksun

    yo I was trying to create something exactly like this! to those who say it's a waste of time don't read it!it roxzorz!

  • Sendig escape chars

    Posted by Legacy on 02/28/2002 12:00am

    Originally posted by: Lucio Lopez

    I'm trying to send a command that contains a ']' character, and after that VB winsock control closes the connection. And it does that closing without receiving anything at the ReceiveData event.

    Does anybody knows how to send this special character?

    Thanx in advance.

  • with no time..this helped!

    Posted by Legacy on 07/12/2001 12:00am

    Originally posted by: Yasir

    Very new to VB (1 week), and needed to build a quick TCP server component with customized commands. This was a great help, it saved me a lot of reading and compile time.Thanx.

  • TelNet client

    Posted by Legacy on 04/29/2001 12:00am

    Originally posted by: Klaus Karkov

    Hi Sanjeev
    I have tried your telnet server VB thing, and seems to work just fine. But I was actually looking for a Client application.
    Basically I just want to create an application where I can control a standard RS232 port via a TelNet connection. Do you know of anyone who might have this kind of VB program.

    Best Regards,

    Klaus Karkov

  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Mobile is introducing sweeping changes throughout your workplace. As a senior stakeholder driving mobile initiatives in your organization, you may be lost in a sea of technologies and claims from vendors promising rapid delivery of applications to your employees, customers, and partners. To help explain some of the topics you will need to be aware of, and to separate the must-haves from the nice-to-haves, this reference guide can help you with applying a mobile strategy in the context of application …

  • Savvy enterprises are discovering that the cloud holds the power to transform IT processes and support business objectives. IT departments can use the cloud to redefine the continuum of development and operations—a process that is becoming known as DevOps. Download the Executive Brief DevOps: Why IT Operations Managers Should Care About the Cloud—prepared by Frost & Sullivan and sponsored by IBM—to learn how IBM SmartCloud Application services provide a robust platform that streamlines …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds