Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Telnet  RSS feed

 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Anyone know of a good java api that i can use for telnet connections and commands?

Also, is there any example source code for the api that would be great,

Thanks,

Niall
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
telnet is just a character connection to port 25. The standard Java net and io functions are easy to use for this. You only need 20 lines of code or so.

Any 'network programming' example, article, book, etc. will have what you need to get started.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15859
80
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try searching for "java telnet" on Google and you'll find: Telnet + SSH + Terminal for Java and others.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pat Farrell:
telnet is just a character connection to port 25.

That would be 23. Port 25 is SMTP.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also there's a whole binary protocol that you can go through at the beginning to negotiate terminal characteristics and such; the telnet protocol is designed so that if one end ignores the negotiation phase, defaults are adopted. But a real telnet library would include all that stuff.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Prime:

That would be 23. Port 25 is SMTP.


Right, sorry, what's 2 between friends.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!