public class HostProvisioner
extends java.lang.Object
implements com.jcraft.jsch.UserInfo
Constructor and Description |
---|
HostProvisioner(java.lang.String host)
Connects to port 22, user root, with no password
|
HostProvisioner(java.lang.String host,
java.lang.String user)
Connects to port 22
|
HostProvisioner(java.lang.String host,
java.lang.String user,
java.lang.String password)
Connects to port 22
|
HostProvisioner(java.lang.String host,
java.lang.String user,
java.lang.String password,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
addKeyFile(java.lang.String keyFile) |
java.lang.String |
getPassphrase() |
java.lang.String |
getPassword() |
boolean |
promptPassphrase(java.lang.String arg0) |
boolean |
promptPassword(java.lang.String arg0) |
boolean |
promptYesNo(java.lang.String arg0) |
void |
runRemoteCommand(java.lang.String remoteCommand) |
void |
showMessage(java.lang.String arg0) |
void |
uploadAndRun(java.lang.String script,
java.lang.String rootDir) |
void |
uploadForDeployment(java.lang.String from,
java.lang.String to)
Creates the directory for the file if necessary
and uploads the file
|
public HostProvisioner(java.lang.String host, java.lang.String user, java.lang.String password, int port)
host
- host to connect to (public facing dns)user
- the user to connect with (default root otherwise)password
- the password to use if anyport
- the port to connect to(default 22)public HostProvisioner(java.lang.String host, java.lang.String user, java.lang.String password)
host
- host to connect to (public facing dns)user
- the user to connect with (default root otherwise)password
- the password to use if anypublic HostProvisioner(java.lang.String host, java.lang.String user)
host
- host to connect to (public facing dns)user
- the user to connect with (default root otherwise)public HostProvisioner(java.lang.String host)
host
- host to connect to (public facing dns)public void uploadAndRun(java.lang.String script, java.lang.String rootDir) throws java.lang.Exception
java.lang.Exception
public void runRemoteCommand(java.lang.String remoteCommand) throws java.lang.Exception
java.lang.Exception
public void uploadForDeployment(java.lang.String from, java.lang.String to) throws java.lang.Exception
from
- the directory to upload fromto
- the destination directory on the remote serverjava.lang.Exception
public void addKeyFile(java.lang.String keyFile) throws java.lang.Exception
java.lang.Exception
public java.lang.String getPassphrase()
getPassphrase
in interface com.jcraft.jsch.UserInfo
public java.lang.String getPassword()
getPassword
in interface com.jcraft.jsch.UserInfo
public boolean promptPassphrase(java.lang.String arg0)
promptPassphrase
in interface com.jcraft.jsch.UserInfo
public boolean promptPassword(java.lang.String arg0)
promptPassword
in interface com.jcraft.jsch.UserInfo
public boolean promptYesNo(java.lang.String arg0)
promptYesNo
in interface com.jcraft.jsch.UserInfo
public void showMessage(java.lang.String arg0)
showMessage
in interface com.jcraft.jsch.UserInfo