Package org.jline.builtins.ssh
Class Ssh.JLineUserInteraction
java.lang.Object
org.jline.builtins.ssh.Ssh.JLineUserInteraction
- All Implemented Interfaces:
org.apache.sshd.client.auth.keyboard.UserInteraction
,org.apache.sshd.common.config.keys.FilePasswordProvider
- Enclosing class:
Ssh
private static class Ssh.JLineUserInteraction
extends Object
implements org.apache.sshd.client.auth.keyboard.UserInteraction, org.apache.sshd.common.config.keys.FilePasswordProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.common.config.keys.FilePasswordProvider
org.apache.sshd.common.config.keys.FilePasswordProvider.Decoder<T>, org.apache.sshd.common.config.keys.FilePasswordProvider.ResourceDecodeResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LineReader
private final PrintStream
private final Terminal
Fields inherited from interface org.apache.sshd.common.config.keys.FilePasswordProvider
EMPTY
Fields inherited from interface org.apache.sshd.client.auth.keyboard.UserInteraction
AUTO_DETECT_PASSWORD_PROMPT, CHECK_INTERACTIVE_PASSWORD_DELIM, DEFAULT_AUTO_DETECT_PASSWORD_PROMPT, DEFAULT_CHECK_INTERACTIVE_PASSWORD_DELIM, DEFAULT_INTERACTIVE_PASSWORD_PROMPT, INTERACTIVE_PASSWORD_PROMPT, NONE
-
Constructor Summary
ConstructorsConstructorDescriptionJLineUserInteraction
(Terminal terminal, LineReader reader, PrintStream stderr) -
Method Summary
Modifier and TypeMethodDescriptiongetPassword
(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resourceKey, int retryIndex) getUpdatedPassword
(org.apache.sshd.client.session.ClientSession session, String prompt, String lang) String[]
interactive
(org.apache.sshd.client.session.ClientSession s, String name, String instruction, String lang, String[] prompt, boolean[] echo) boolean
isInteractionAllowed
(org.apache.sshd.client.session.ClientSession session) private String
void
serverVersionInfo
(org.apache.sshd.client.session.ClientSession session, List<String> lines) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.config.keys.FilePasswordProvider
decode, handleDecodeAttemptResult
Methods inherited from interface org.apache.sshd.client.auth.keyboard.UserInteraction
resolveAuthPasswordAttempt, resolveAuthPublicKeyIdentityAttempt
-
Field Details
-
terminal
-
reader
-
stderr
-
-
Constructor Details
-
JLineUserInteraction
-
-
Method Details
-
getPassword
public String getPassword(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resourceKey, int retryIndex) throws IOException - Specified by:
getPassword
in interfaceorg.apache.sshd.common.config.keys.FilePasswordProvider
- Throws:
IOException
-
welcome
public void welcome(org.apache.sshd.client.session.ClientSession session, String banner, String lang) - Specified by:
welcome
in interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
interactive
public String[] interactive(org.apache.sshd.client.session.ClientSession s, String name, String instruction, String lang, String[] prompt, boolean[] echo) - Specified by:
interactive
in interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
isInteractionAllowed
public boolean isInteractionAllowed(org.apache.sshd.client.session.ClientSession session) - Specified by:
isInteractionAllowed
in interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
serverVersionInfo
public void serverVersionInfo(org.apache.sshd.client.session.ClientSession session, List<String> lines) - Specified by:
serverVersionInfo
in interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
getUpdatedPassword
public String getUpdatedPassword(org.apache.sshd.client.session.ClientSession session, String prompt, String lang) - Specified by:
getUpdatedPassword
in interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
readLine
-