Computing.Net > Forums > Unix > java running unix cmds remotely

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

java running unix cmds remotely

Reply to Message Icon

Name: guyfromTo
Date: June 11, 2004 at 06:58:36 Pacific
OS: unix/windows
CPU/Ram: 1 gig
Comment:

Hi, I'm trying to use java from a windows machine to access a unix machine on the network and execute unix commands (ie "ls") and output them back to the windows machine. I've been doing some searching but I haven't been too successful, any ideas/help would be much appreciated. Thanks




Sponsored Link
Ads by Google

Response Number 1
Name: Dlonra
Date: June 11, 2004 at 18:45:02 Pacific
Reply:

Why java?
Can you login and/or run commands manually on remote unix?


0

Response Number 2
Name: Sord
Date: June 11, 2004 at 23:28:17 Pacific
Reply:

Google for Putty and download it.
Then enable either telnet or SSH remote logins on your
unix machine (unless one of them already is). I suggest
SSH as it is encrypted while telnet is plaintext.
Then simply connect to your machine via Putty and you
have a remote console running on your Windows box.


0

Response Number 3
Name: guyfromTo
Date: June 14, 2004 at 06:42:11 Pacific
Reply:

Hi guys, thanks for the responses. The reason why I need to do it in java and remotely is because I'm writing a JSP page for users. I don't want the users to have direct access to the unix server but I want to give them the ability to execute certain unix commands from their web browser (for example, by clicking on a button on the web page, it will do a "ls" on the unix machine and output the results back onto their webbrowser). The webserver is on a different machine. What I'm having troublw with is how I am supposed to establish a "connection" with the unix machine and then execute commands on it, I am familiar with the exec command but I believe that only works if the java program is sitting on the same machine that it will be running commands on. I hope this clarifies my problem. Thanks again


0

Response Number 4
Name: Wolfbone
Date: June 14, 2004 at 09:24:07 Pacific
Reply:

You could try using the code available from javassh.org. Both telnet and ssh connections are implemented and there is a connection relay demon which it sounds like you would need.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: java running unix cmds remotely

running unix scripts remotely using www.computing.net/answers/unix/running-unix-scripts-remotely-using/3762.html

run unix command thr java program www.computing.net/answers/unix/run-unix-command-thr-java-program-/5887.html

java on unix www.computing.net/answers/unix/java-on-unix/5754.html