-
Notifications
You must be signed in to change notification settings - Fork 602
Home
ansell edited this page Sep 26, 2011
·
13 revisions
-
Multiple sessions
Session
objects are not reusable, so you can only have one command/shell/subsystem viaexec()
,startShell()
orstartSubsystem()
respectively. But you can start multiple sessions over a single connection. -
Toning down the logging
sshj uses slf4j, which is just a facade, so it depends on how the underlying logging implementation you are using is configured. For example, in case of log4j this is typically accomplished with a
log4j.properties
in the classpath. Filter out/down messages from thenet.schmizz
category. -
Android support
sshj works on Android 2.3+, with a slightly different Config.
-
I/O with Channels
// on any Channel, including Session.Command, Session.Shell and Session.Subsystem
getOutputStream() // -> java.io.OutputStream; corresponds to stdin
getInputStream() // -> java.io.InputStream; corresponds to stdout
// only on Session.Command and Session.Shell
getErrorStream() // -> java.io.InputStream; corresponds to stderr
// only on Session.Command
getOutputAsString() // -> java.lang.String; blocks until it reads all data from stdout
-
Concurrency
Multiplexing channels over a single connection is supported.