| net.schmizz.sshj.connection.channel.direct.Session |
Known Indirect Subclasses
|
A session channel provides for execution of a remote command, shell or subsystem. Before this requests like starting X11 forwarding, setting environment variables, allocating a
PTY etc. can be made.
session channel for more than one of command, shell, or subsystem. Once one of
these has been started this instance's API is invalid and that of the specific targets
returned should be used.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Session.Command | Command API. | ||||||||||
| Session.Shell | Shell API. | ||||||||||
| Session.Subsystem | Subsystem API. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Allocates a default PTY.
| |||||||||||
Allocate a psuedo-terminal for this session.
| |||||||||||
Execute a remote command.
| |||||||||||
Request X11 forwarding.
| |||||||||||
Set an enviornment variable.
| |||||||||||
Request a shell.
| |||||||||||
Request a subsystem.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
java.io.Closeable
| |||||||||||
From interface
net.schmizz.sshj.common.ErrorNotifiable
| |||||||||||
From interface
net.schmizz.sshj.common.SSHPacketHandler
| |||||||||||
From interface
net.schmizz.sshj.connection.channel.Channel
| |||||||||||
Allocates a default PTY. The default PTY is "vt100" with the echo modes disabled.
Allocate a psuedo-terminal for this session.
0 dimension parameters will be ignored by the server.| term | TERM environment variable value (e.g., vt100) |
|---|---|
| cols | Terminal width, cols (e.g., 80) |
| rows | Terminal height, rows (e.g., 24) |
| width | Terminal width, pixels (e.g., 640) |
| height | Terminal height, pixels (e.g., 480) |
| modes |
Execute a remote command.
| command |
|---|
Session.Command instance which should now be used| ConnectionException | if the request to execute the command failed |
|---|---|
| TransportException | if there is an error sending the request |
Request X11 forwarding.
| authProto | X11 authentication protocol name |
|---|---|
| authCookie | X11 authentication cookie |
| screen | X11 screen number |
| ConnectionException | if the request failed |
|---|---|
| TransportException | if there was an error sending the request |
Set an enviornment variable.
| name | Name of the variable |
|---|---|
| value | Value to set |
| ConnectionException | if the request failed |
|---|---|
| TransportException | if there was an error sending the request |
Request a shell.
Session.Shell instance which should now be used| ConnectionException | if the request failed |
|---|---|
| TransportException | if there was an error sending the request |
Request a subsystem.
| name | Subsystem name |
|---|
Session.Subsystem instance which should now be used| ConnectionException | if the request failed |
|---|---|
| TransportException | if there was an error sending the request |