public class SShConnection extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static SshListener |
LOGGER |
| Constructor and Description |
|---|
SShConnection(SshAddress address) |
SShConnection(String address) |
SShConnection(String user,
String host,
int port,
String keyFilePath,
String keyPassword) |
public static final SshListener LOGGER
public SShConnection(String address)
public SShConnection(SshAddress address)
public boolean isRedirectErrorStream()
public SShConnection setRedirectErrorStream()
public SShConnection setRedirectErrorStream(boolean redirectErrorStream)
public void reset()
public SShConnection addListener(SshListener listener)
public SShConnection removeListener(SshListener listener)
public boolean isFailFast()
public SShConnection failFast()
public SShConnection sailFast(boolean failFast)
public SShConnection setFailFast(boolean failFast)
public SShConnection redirectOutput(PrintStream out)
public boolean isGrabOutputString()
public SShConnection grabOutputString()
public SShConnection grabOutputString(boolean grab)
public static int checkAck(InputStream in) throws IOException
IOExceptionpublic int exec(String... command)
public int execStringCommand(String command)
public void rm(String from, boolean R)
public void mkdir(String from, boolean p)
public byte[] readRemoteFile(String from)
public InputStream getInputStream(String from)
public void close()
close in interface AutoCloseablepublic String getOutputString()
public PrintStream getOut()
public SShConnection setOut(PrintStream out)
public InputStream prepareStream(File file) throws FileNotFoundException
FileNotFoundExceptionCopyright © 2021 vpc open source initiative. All rights reserved.