public class SshClient extends Object implements Client<NullRequest,SshResponse>
SshClient class.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_RETRY |
Constructor and Description |
---|
SshClient() |
Modifier and Type | Method and Description |
---|---|
void |
close()
close
|
void |
connect(InetAddress address,
int port,
int timeout)
connect
|
SshResponse |
receiveBanner()
receiveBanner
|
SshResponse |
sendRequest(NullRequest request)
sendRequest
|
void |
setBanner(String banner)
setBanner
|
void |
setClientBanner(String clientBanner)
setClientBanner
|
void |
setMatch(String match)
setMatch
|
public static final int DEFAULT_RETRY
public void close()
close
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Client<NullRequest,SshResponse>
public void connect(InetAddress address, int port, int timeout) throws Exception
connect
connect
in interface Client<NullRequest,SshResponse>
address
- a InetAddress
object.port
- a int.timeout
- a int.IOException
- if any.Exception
- if any.public SshResponse receiveBanner() throws IOException, Exception
receiveBanner
receiveBanner
in interface Client<NullRequest,SshResponse>
SshResponse
object.IOException
- if any.Exception
- if any.public SshResponse sendRequest(NullRequest request) throws IOException, Exception
sendRequest
sendRequest
in interface Client<NullRequest,SshResponse>
request
- a NullRequest
object.SshResponse
object.IOException
- if any.Exception
- if any.Copyright © 2020. All rights reserved.