public class SshClient extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT_MS |
Constructor and Description |
---|
SshClient(InetSocketAddress addr,
String username,
String password) |
Modifier and Type | Method and Description |
---|---|
static Callable<Boolean> |
canConnectViaSsh(InetSocketAddress addr,
String username,
String password) |
void |
close() |
InetSocketAddress |
getAddr() |
String |
getStderr() |
String |
getStdout() |
boolean |
isShellClosed()
Checks if the shell's channel is closed.
|
Callable<Boolean> |
isShellClosedCallable() |
PrintStream |
openShell() |
void |
setTimeout(int timeoutInMs) |
public static final int DEFAULT_TIMEOUT_MS
public SshClient(InetSocketAddress addr, String username, String password)
public PrintStream openShell() throws Exception
Exception
public String getStdout() throws IOException
IOException
public String getStderr() throws IOException
IOException
public void setTimeout(int timeoutInMs)
public InetSocketAddress getAddr()
public void close() throws Exception
close
in interface AutoCloseable
Exception
public boolean isShellClosed()
public static Callable<Boolean> canConnectViaSsh(InetSocketAddress addr, String username, String password)
Copyright © 2022. All rights reserved.