This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to execute telnet commands without using Console  RSS feed

 
janardhan Gv
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using apache commons.net api for telnet to communicate with a switch. Now I want to run telnet commands through programatically. for example, my telnet commands are all in one text(properties) file including username and password. Without typing any commands in a console i want to execute the commands which are in text(properties) file. Is it possible or not. can anyone please help me. Thanks..

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this question about how to use file I/O (or possible the Properties class) for reading a file, or about how to use the Commons Net API for sending commands over Telnet? The two parts seem unrelated.
 
janardhan Gv
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf Dittmer,

Thanks for your reply. I am able to run the telnet using apache commons.net api. bt my requirement is to read commands from a file and execute over telnet and output should be in another file.


 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what do you have so far, and where are you stuck making progress?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!