How to write your own Telnet Server in VB5/6


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

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 08:00am

    Originally posted by: mukesh bhootra

    it is very nice sir

  • Thank you!

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

    Originally posted by: SicMetal.com

    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 07: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 08:00am

    Originally posted by: Madhu Gumma

    Very Useful - thanks a lot

  • I want to telnet for client.!

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

    Originally posted by: lsjch

    I want to telnet for client.! giving me to :lsjch@163.net ,

  • Very Useful - thanks

    Posted by Legacy on 07/04/2002 07: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 07: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 08: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 07: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 07: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 ...

  • You must have javascript enabled in order to post comments.

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

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date