• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connect to UNIX and execute commands from Java

 
Pushpalatha Oleti
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to connect to unix and execute few commands to reset password of a user (on unix). I understand I cannot go with JSP to accomplish this and I have to use java code. In the link connect to unix , it is mentioned about enchanter jar. Could you please explain what enchanter jar is all about and how to connect to unix.

P.S: I am new to JavaRanch and Java, please excuse any mistakes.

Thanks,
Pushpa
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.
If I understood your question correctly, you wish to execute some command on a remote unix machine, using java. I am not sure if this is even possible.
However, i will move your topic to a more appropriate forum, and hopefully someone might be able to help you out.
 
Badal Chowdhary
Ranch Hand
Posts: 34
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out JSch if that helps:
http://www.jcraft.com/jsch/
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could also use exec() to run ssh and pass the passwd command to it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic