org.apache.tools.ant.taskdefs.optional.ssh
public class SSHUserInfo extends Object implements UserInfo, UIKeyboardInteractive
Constructor Summary | |
---|---|
SSHUserInfo() Constructor for SSHUserInfo. | |
SSHUserInfo(String password, boolean trustAllCertificates)
Constructor for SSHUserInfo. |
Method Summary | |
---|---|
String | getKeyfile()
Returns the keyfile. |
String | getName()
Gets the user name. |
String | getPassphrase(String message)
Gets the pass phrase of the user. |
String | getPassphrase()
Returns the passphrase. |
String | getPassword()
Gets the user's password. |
boolean | getTrust() |
boolean | prompt(String str)
Prompts a string. |
String[] | promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo)
Implementation of UIKeyboardInteractive#promptKeyboardInteractive. |
boolean | promptPassphrase(String message)
Implement the UserInfo interface. |
boolean | promptPassword(String passwordPrompt)
Implement the UserInfo interface. |
boolean | promptYesNo(String message)
Implement the UserInfo interface. |
boolean | retry()
Indicates whether a retry was done. |
void | setKeyfile(String keyfile)
Sets the keyfile. |
void | setName(String name)
Sets the name. |
void | setPassphrase(String passphrase)
Sets the passphrase. |
void | setPassword(String password)
Sets the password. |
void | setTrust(boolean trust)
Sets the trust. |
void | showMessage(String message)
Implement the UserInfo interface (noop). |
Parameters: password the user's password trustAllCertificates if true trust hosts whose identity is unknown
Returns: String
Returns: the user name
Parameters: message a message
Returns: the passphrase
Returns: String
Returns: the user's password
Returns: whether to trust or not.
Parameters: str the string
Returns: whether the string was prompted
Parameters: destination not used. name not used. instruction not used. prompt the method checks if this is one in length. echo the method checks if the first element is false.
Returns: the password in an size one array if there is a password and if the prompt and echo checks pass.
Parameters: message ignored
Returns: true always
Parameters: passwordPrompt ignored
Returns: true the first time this is called, false otherwise
Parameters: message ignored
Returns: the value of trustAllCertificates
Returns: whether a retry was done
Parameters: keyfile The keyfile to set
Parameters: name The name to set
Parameters: passphrase The passphrase to set
Parameters: password The password to set
Parameters: trust whether to trust or not.
Parameters: message ignored