• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connect to UNIX and execute commands from Java

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 34
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out JSch if that helps:
http://www.jcraft.com/jsch/
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could also use exec() to run ssh and pass the passwd command to it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic