public class SSHUserInfo
extends java.lang.Object
implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive
Constructor and Description |
---|
SSHUserInfo()
Constructor for SSHUserInfo.
|
SSHUserInfo(java.lang.String password,
boolean trustAllCertificates)
Constructor for SSHUserInfo.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getKeyfile()
Returns the keyfile.
|
java.lang.String |
getName()
Gets the user name.
|
java.lang.String |
getPassphrase()
Returns the passphrase.
|
java.lang.String |
getPassphrase(java.lang.String message)
Gets the pass phrase of the user.
|
java.lang.String |
getPassword()
Gets the user's password.
|
boolean |
getTrust() |
boolean |
prompt(java.lang.String str)
Prompts a string.
|
java.lang.String[] |
promptKeyboardInteractive(java.lang.String destination,
java.lang.String name,
java.lang.String instruction,
java.lang.String[] prompt,
boolean[] echo)
Implementation of UIKeyboardInteractive#promptKeyboardInteractive.
|
boolean |
promptPassphrase(java.lang.String message)
Implement the UserInfo interface.
|
boolean |
promptPassword(java.lang.String passwordPrompt)
Implement the UserInfo interface.
|
boolean |
promptYesNo(java.lang.String message)
Implement the UserInfo interface.
|
boolean |
retry()
Indicates whether a retry was done.
|
void |
setKeyfile(java.lang.String keyfile)
Sets the keyfile.
|
void |
setName(java.lang.String name)
Sets the name.
|
void |
setPassphrase(java.lang.String passphrase)
Sets the passphrase.
|
void |
setPassword(java.lang.String password)
Sets the password.
|
void |
setTrust(boolean trust)
Sets the trust.
|
void |
showMessage(java.lang.String message)
Implement the UserInfo interface (noop).
|
public SSHUserInfo()
public SSHUserInfo(java.lang.String password, boolean trustAllCertificates)
password
- the user's passwordtrustAllCertificates
- if true trust hosts whose identity is unknownpublic java.lang.String getName()
public java.lang.String getPassphrase(java.lang.String message)
message
- a messagepublic java.lang.String getPassword()
getPassword
in interface com.jcraft.jsch.UserInfo
public boolean prompt(java.lang.String str)
str
- the stringpublic boolean retry()
public void setName(java.lang.String name)
name
- The name to setpublic void setPassphrase(java.lang.String passphrase)
passphrase
- The passphrase to setpublic void setPassword(java.lang.String password)
password
- The password to setpublic void setTrust(boolean trust)
trust
- whether to trust or not.public boolean getTrust()
public java.lang.String getPassphrase()
getPassphrase
in interface com.jcraft.jsch.UserInfo
public java.lang.String getKeyfile()
public void setKeyfile(java.lang.String keyfile)
keyfile
- The keyfile to setpublic boolean promptPassphrase(java.lang.String message)
promptPassphrase
in interface com.jcraft.jsch.UserInfo
message
- ignoredpublic boolean promptPassword(java.lang.String passwordPrompt)
promptPassword
in interface com.jcraft.jsch.UserInfo
passwordPrompt
- ignoredpublic boolean promptYesNo(java.lang.String message)
promptYesNo
in interface com.jcraft.jsch.UserInfo
message
- ignoredpublic void showMessage(java.lang.String message)
showMessage
in interface com.jcraft.jsch.UserInfo
message
- ignoredpublic java.lang.String[] promptKeyboardInteractive(java.lang.String destination, java.lang.String name, java.lang.String instruction, java.lang.String[] prompt, boolean[] echo)
promptKeyboardInteractive
in interface com.jcraft.jsch.UIKeyboardInteractive
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.