org.ow2.jasmine.vmm.agent.driver.util
Class RemoteExec
java.lang.Object
org.ow2.jasmine.vmm.agent.driver.util.RemoteExec
public class RemoteExec
- extends java.lang.Object
Utility class allowing to invoke commands on a remote host using SSH
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteExec
public RemoteExec()
commandAsRoot
public static RemoteExec.Result commandAsRoot(java.lang.String host,
RemoteExec.SshAuthInfo authInfo,
java.lang.String command)
throws RemoteExec.SshException
- Invoke a command through SSH on a remote host as root
- Parameters:
host - target hostpassword - root passwordcommand - command to exec on the remote host as root
- Returns:
- result of the invocation
- Throws:
RemoteExec.SshException - raised if the SSH connection could not be
established
command
public static RemoteExec.Result command(java.lang.String host,
java.lang.String user,
RemoteExec.SshAuthInfo authInfo,
java.lang.String command)
throws RemoteExec.SshException
- Invoke a command through SSH on a remote host
- Parameters:
host - target hostuser - user loginpassword - user passwordcommand - command to exec on the remote host
- Returns:
- result of the invocation
- Throws:
RemoteExec.SshException - raised if the SSH connection could not be
established
Copyright © 2009 OW2 Consortium. All Rights Reserved.