• Post Reply Bookmark Topic Watch Topic
  • New Topic

A Simple Telnet Session

 
Prashant Sehgal
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do I open a simple telnet session with a server?
My application should be able to ask for a username and password and login to a remote machine. How do I do it?
Also, is it possible (given that I make GUI for it) to write a telnet client? Something that provides a command interpreter, sends the commands to the server, reads the response and displays it in an output window?
I mean how do we "maintain" a telnet session with the server?
 
nandu pc
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible to write a telnet client ( GUI or whatever it is , )
you need to have a server ( obviously the Telnet server ) running at a known IP address, then you can connect to it using a Socket instance.
once you are connected to the telnet server, it send you some messages along with username prompt, after recieving these messages, you need to send a responce. all this is usually done with the help of IO Streams. and Synchronization must be ensured to prevent unforeseen things.
Goodluck
NaNdU
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
before sending username/password data you willl need to perform option negotiation to agree on the terminal settings to use. see RFC 854 and RFC 855 for more information on option negotiation.
also the Telnet component included in iNet Factory can handle much of this for you
for more information see
http://www.jscape.com/inetfactory/
 
Van Glass
Ranch Hand
Posts: 110
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!