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
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
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.
Summary: Hi, I wrote a script that I use to convert files from one format to another so that I can ftp those files to our pc network. The script works fine when I have direct access our Unix box. However, when...
Summary: hi all, Can we call(run) unix commands through a java program? Plzz let me know.... Actually i want the commands like "ls" to run automatically when some event occurs & then i want to store its output...
Summary: hello everybody, can anyone tell me how to get JAVA RUN TIME on Unix machine....actually i m working on a project which is cross platform...so i need to install java on unix ...but i dont know how to...