Package org.jline.builtins.ssh
Class Ssh
java.lang.Object
org.jline.builtins.ssh.Ssh
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
private static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Supplier
<org.apache.sshd.client.SshClient> private static final int
private final Consumer
<Ssh.ExecuteParams> static final String[]
private String
private int
private org.apache.sshd.server.SshServer
private 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.ClientSession
connectWithRetries
(PrintWriter stdout, org.apache.sshd.client.SshClient client, String username, String host, int port, int maxAttempts) private static int
getFlag
(Attributes attributes, Attributes.InputFlag flag) private static int
getFlag
(Attributes attributes, Attributes.LocalFlag flag) private static int
getFlag
(Attributes attributes, Attributes.OutputFlag flag) void
ssh
(Terminal terminal, LineReader reader, String user, InputStream stdin, PrintStream stdout, PrintStream stderr, String[] argv) void
sshd
(PrintStream stdout, PrintStream stderr, String[] argv) private void
start()
private void
status
(PrintStream stdout) private void
stop()
-
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
-