File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes can I run telnet thru a java program? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "can I run telnet thru a java program?" Watch "can I run telnet thru a java program?" New topic
Author

can I run telnet thru a java program?

vikram kulkarni
Greenhorn

Joined: Feb 14, 2000
Posts: 1
can I run telnet thru a java program?
i need to login to a unix server and run a script. this script would run some unix commands (e.g date, who etc.) and redirect this to a file on the unix server. my program should then be able to read this file.
thanks
vicky
Dave Smith
Greenhorn

Joined: Jan 12, 2000
Posts: 23
I would imagine this would work. You would need to connect via a URLConnection prehaps, then wait until you read the login information from the socket. Then write the stuff to login, and basically control the whole session as if you were typing it yourself.
BTW, you can use the "cat" command to put the contents of the file you have just written to the socket.
Hope this helps.
Dave Smith
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can I run telnet thru a java program?
 
Similar Threads
Deploy JAR file to UNIX Server
How to unzip a file on a remote unix server using java
I want to login ( using Telnet ) to a Unix server
How to login to linux server using sockets
I wanted to login ( using Telnet ) to a Linux server