Package org.jline.builtins.ssh
Class Ssh
java.lang.Object
org.jline.builtins.ssh.Ssh
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Supplier<org.apache.sshd.client.SshClient> private static final intprivate final Consumer<Ssh.ExecuteParams> static final String[]private Stringprivate intprivate org.apache.sshd.server.SshServerprivate final Supplier<org.apache.sshd.server.SshServer> private final Consumer<Ssh.ShellParams> -
Constructor Summary
ConstructorsConstructorDescriptionSsh(Consumer<Ssh.ShellParams> shell, Consumer<Ssh.ExecuteParams> execute, Supplier<org.apache.sshd.server.SshServer> serverBuilder, Supplier<org.apache.sshd.client.SshClient> clientBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.sshd.client.session.ClientSessionconnectWithRetries(PrintWriter stdout, org.apache.sshd.client.SshClient client, String username, String host, int port, int maxAttempts) private static intgetFlag(Attributes attributes, Attributes.InputFlag flag) private static intgetFlag(Attributes attributes, Attributes.LocalFlag flag) private static intgetFlag(Attributes attributes, Attributes.OutputFlag flag) voidssh(Terminal terminal, LineReader reader, String user, InputStream stdin, PrintStream stdout, PrintStream stderr, String[] argv) voidsshd(PrintStream stdout, PrintStream stderr, String[] argv) private voidstart()private voidstatus(PrintStream stdout) private voidstop()
-
Field Details
-
functions
-
defaultPort
private static final int defaultPort- See Also:
-
shell
-
execute
-
serverBuilder
-
clientBuilder
-
server
private org.apache.sshd.server.SshServer server -
port
private int port -
ip
-
-
Constructor Details
-
Ssh
public Ssh(Consumer<Ssh.ShellParams> shell, Consumer<Ssh.ExecuteParams> execute, Supplier<org.apache.sshd.server.SshServer> serverBuilder, Supplier<org.apache.sshd.client.SshClient> clientBuilder)
-
-
Method Details
-
ssh
public void ssh(Terminal terminal, LineReader reader, String user, InputStream stdin, PrintStream stdout, PrintStream stderr, String[] argv) throws Exception - Throws:
Exception
-
getFlag
-
getFlag
-
getFlag
-
connectWithRetries
private org.apache.sshd.client.session.ClientSession connectWithRetries(PrintWriter stdout, org.apache.sshd.client.SshClient client, String username, String host, int port, int maxAttempts) throws Exception - Throws:
Exception
-
sshd
- Throws:
Exception
-
status
-
start
- Throws:
IOException
-
stop
- Throws:
IOException
-