|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.core.AbstractActor
adams.flow.standalone.AbstractStandalone
adams.flow.standalone.SSHConnection
public class SSHConnection
Provides access to a remote host via SSH.
For more information see:
(2011). JSch - JSch is a pure Java implementation of SSH2..
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: SSHConnection
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-host <java.lang.String> (property: host) The host (name/IP address) to connect to. default:
-port <int> (property: port) The port to connect to. default: 22 minimum: 1 maximum: 65535
-user <java.lang.String> (property: user) The SSH user to use for connecting. default: fracpete
-password <adams.core.base.BasePassword> (property: password)
The password of the SSH user to use for connecting.
default: {}
-known-hosts <adams.core.io.PlaceholderFile> (property: knownHosts)
The file storing the known hosts.
default: ${HOME}/.ssh/known_hosts
-forward-x (property: forwardX) If set to true, then X is forwarded.
-x-host <java.lang.String> (property: XHost) The xhost (name/IP address) to connect to. default:
-x-port <java.lang.String> (property: XPort) The xport to connect to. default: 0:0
| Field Summary | |
|---|---|
protected boolean |
m_ForwardX
whether to forward X11. |
protected String |
m_Host
the SSH host. |
protected PlaceholderFile |
m_KnownHosts
the file with known hosts. |
protected BasePassword |
m_Password
the SSH password to use. |
protected int |
m_Port
the SSH port. |
protected com.jcraft.jsch.Session |
m_Session
the SSH session. |
protected String |
m_User
the SSH user to use. |
protected String |
m_XHost
the xhost to use. |
protected String |
m_XPort
the xport to use. |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Fields inherited from interface adams.flow.core.Actor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ |
| Constructor Summary | |
|---|---|
SSHConnection()
|
|
| Method Summary | |
|---|---|
static int |
checkAck(InputStream in)
Checks the stream (scp). |
void |
defineOptions()
Adds options to the internal list of options. |
protected void |
disconnect()
Disconnects the SSH session, if necessary. |
protected String |
doExecute()
Executes the flow item. |
String |
forwardXTipText()
Returns the tip text for this property. |
boolean |
getForwardX()
Returns whether X11 is forwarded. |
String |
getHost()
Returns the host to connect to. |
PlaceholderFile |
getKnownHosts()
Returns the file with the known hosts. |
BasePassword |
getPassword()
Returns the SSH password to use. |
int |
getPort()
Returns the port to connect to. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
com.jcraft.jsch.Session |
getSession()
Returns the SSH session. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
String |
getUser()
Returns the SSH user name to use. |
String |
getXHost()
Returns the xhost to connect to. |
String |
getXPort()
Returns the xport to connect to. |
String |
globalInfo()
Returns a string describing the object. |
String |
hostTipText()
Returns the tip text for this property. |
String |
knownHostsTipText()
Returns the tip text for this property. |
String |
passwordTipText()
Returns the tip text for this property. |
String |
portTipText()
Returns the tip text for this property. |
protected void |
reset()
Resets the actor. |
void |
setForwardX(boolean value)
Sets whether to forward X11. |
void |
setHost(String value)
Sets the host to connect to. |
void |
setKnownHosts(PlaceholderFile value)
Sets the file with the known hosts. |
void |
setPassword(BasePassword value)
Sets the SSH password to use. |
void |
setPort(int value)
Sets the port to connect to. |
void |
setUser(String value)
Sets the SSH user to use. |
void |
setXHost(String value)
Sets the xhost to connect to. |
void |
setXPort(String value)
Sets the xport to connect to. |
String |
userTipText()
Returns the tip text for this property. |
void |
wrapUp()
Cleans up after the execution has finished. |
String |
XHostTipText()
Returns the tip text for this property. |
String |
XPortTipText()
Returns the tip text for this property. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface adams.core.option.OptionHandler |
|---|
cleanUpOptions, getOptionManager |
| Field Detail |
|---|
protected String m_Host
protected int m_Port
protected String m_User
protected BasePassword m_Password
protected PlaceholderFile m_KnownHosts
protected boolean m_ForwardX
protected String m_XHost
protected String m_XPort
protected com.jcraft.jsch.Session m_Session
| Constructor Detail |
|---|
public SSHConnection()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorprotected void reset()
reset in class AbstractActorpublic String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in interface ActorgetQuickInfo in class AbstractActorpublic void setHost(String value)
value - the host name/ippublic String getHost()
public String hostTipText()
public void setPort(int value)
value - the portpublic int getPort()
public String portTipText()
public void setUser(String value)
value - the user namepublic String getUser()
public String userTipText()
public void setPassword(BasePassword value)
value - the passwordpublic BasePassword getPassword()
public String passwordTipText()
public void setKnownHosts(PlaceholderFile value)
value - the filepublic PlaceholderFile getKnownHosts()
public String knownHostsTipText()
public void setForwardX(boolean value)
value - if true then X11 is forwardedpublic boolean getForwardX()
public String forwardXTipText()
public void setXHost(String value)
value - the host name/ippublic String getXHost()
public String XHostTipText()
public void setXPort(String value)
value - the portpublic String getXPort()
public String XPortTipText()
public com.jcraft.jsch.Session getSession()
protected String doExecute()
doExecute in class AbstractActorprotected void disconnect()
public void wrapUp()
wrapUp in interface ActorwrapUp in class AbstractActor
public static int checkAck(InputStream in)
throws IOException
in - the stream to use
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||