How to Run Remote Commands Using SSH from Java

SSH is a command used to connect or logging into a  remote machine and also execute commands on a remote machine.Here we will see how to use this ssh command and execute remote commands with ssh using java program.
For example  If you want to collect Solaris system information then this will be very useful.Two APIS help you to achieve this task.Either we can use JSCH or Ganymed.

JSCH
It is a pure java implementation of SSH2.Using this api you can connect remote machine programmatically.It has lot of useful features you can check here.

Download JSCH here.

Ganymed
          It is another open source java library which implements the SSH-2 protocol in pure java.We can easily connect ssh server from java program.

Download Ganymed here

Tagged with  
, ,

Related posts:

  1. How to Handle Memory leaks in Java Program
  2. Environment Variables for Java Project

Comments are closed.