org.apache.tools.ant.taskdefs.optional.ssh
public abstract class SSHBase extends Task implements LogListener
Since: Ant 1.6
| Constructor Summary | |
|---|---|
| SSHBase()
Constructor for SSHBase. | |
| Method Summary | |
|---|---|
| boolean | getFailonerror()
Get the failonerror flag. |
| String | getHost()
Get the host. |
| int | getPort()
Get the port attribute. |
| protected SSHUserInfo | getUserInfo()
Get the user information. |
| boolean | getVerbose()
Get the verbose flag. |
| void | init()
Initialize the task.
|
| protected Session | openSession()
Open an ssh seession. |
| void | setFailonerror(boolean failure)
Set the failonerror flag.
|
| void | setHost(String host)
Remote host, either DNS name or IP.
|
| void | setKeyfile(String keyfile)
Sets the keyfile for the user.
|
| void | setKnownhosts(String knownHosts)
Sets the path to the file that has the identities of
all known hosts. |
| void | setPassphrase(String passphrase)
Sets the passphrase for the users key.
|
| void | setPassword(String password)
Sets the password for the user.
|
| void | setPort(int port)
Changes the port used to connect to the remote host.
|
| void | setTrust(boolean yesOrNo)
Setting this to true trusts hosts whose identity is unknown.
|
| void | setUsername(String username)
Username known to remote host.
|
| void | setVerbose(boolean verbose)
Set the verbose flag. |
Returns: the failonerror flag
Returns: the host
Returns: the port
Returns: the user information
Returns: the verbose flag
Since: Ant 1.6.2
Throws: BuildException on error
Returns: the opened session
Throws: JSchException on error
Parameters: failure if true throw a build exception when a failure occuries, otherwise just log the failure and continue
Parameters: host The new host value
Parameters: keyfile The new keyfile value
Parameters: knownHosts a path to the known hosts file.
Parameters: passphrase The new passphrase value
Parameters: password The new password value
Parameters: port port number of remote host.
Parameters: yesOrNo if true trust the identity of unknown hosts.
Parameters: username The new username value
Parameters: verbose if true output more verbose logging
Since: Ant 1.6.2