public class Shell extends Object
Modifier and Type | Field and Description |
---|---|
static int |
EXIT_CODE_PROCESS_ACTIVE |
static int |
EXIT_CODE_UNKNOWN |
static int |
OS_AIX
AIX operating system
|
static int |
OS_DARWIN
Darwin (MAC) operating system
|
static int |
OS_FREEBSD
FreeBSD operating system
|
static int |
OS_HPUX
HP-UX operating system
|
static int |
OS_LINUX
Linux operating system
|
static int |
OS_NETBSD
NetBSD operating system
|
static int |
OS_OPENBSD
OpenBSD operating system
|
static int |
OS_OPENVMS
OpenVMS operating system
|
static int |
OS_SOLARIS
Solaris operating system
|
static int |
OS_UNIX
Unix OS if less than this value.
|
static int |
OS_UNKNOWN
The operating system is unknown
|
static int |
OS_WINDOWS
Windows operating system
|
Constructor and Description |
---|
Shell(SshClient ssh) |
Shell(SshClient ssh,
ShellStartupTrigger trigger) |
Shell(SshClient ssh,
ShellStartupTrigger trigger,
long startupTimeout) |
Shell(SshClient ssh,
ShellStartupTrigger trigger,
long startupTimeout,
String termtype) |
Shell(SshClient ssh,
ShellStartupTrigger trigger,
long startupTimeout,
String termtype,
int cols,
int rows) |
public static final int OS_WINDOWS
public static final int OS_LINUX
public static final int OS_SOLARIS
public static final int OS_AIX
public static final int OS_DARWIN
public static final int OS_FREEBSD
public static final int OS_OPENBSD
public static final int OS_NETBSD
public static final int OS_HPUX
public static final int OS_UNIX
public static final int OS_OPENVMS
public static final int OS_UNKNOWN
public static final int EXIT_CODE_PROCESS_ACTIVE
public static final int EXIT_CODE_UNKNOWN
public Shell(SshClient ssh) throws SshException, SshIOException, ChannelOpenException, IOException, ShellTimeoutException
public Shell(SshClient ssh, ShellStartupTrigger trigger) throws SshException, SshIOException, ChannelOpenException, IOException, ShellTimeoutException
public Shell(SshClient ssh, ShellStartupTrigger trigger, long startupTimeout) throws SshException, SshIOException, ChannelOpenException, IOException, ShellTimeoutException
public Shell(SshClient ssh, ShellStartupTrigger trigger, long startupTimeout, String termtype) throws SshException, SshIOException, ChannelOpenException, IOException, ShellTimeoutException
public Shell(SshClient ssh, ShellStartupTrigger trigger, long startupTimeout, String termtype, int cols, int rows) throws SshException, SshIOException, ChannelOpenException, IOException, ShellTimeoutException
public static void setShellInitTimeout(int timeout)
public InputStream getStartupInputStream()
public boolean inStartup()
public void setPasswordErrorText(String passwordErrorText)
public void setPasswordPrompt(String passwordPrompt)
public ShellReader getStartupReader()
public Shell su(String cmd, String password) throws SshIOException, SshException, IOException, ShellTimeoutException
public Shell su(String cmd, String password, String promptExpression) throws SshException, SshIOException, IOException, ShellTimeoutException
public Shell su(String cmd) throws SshException, SshIOException, IOException, ShellTimeoutException
public Shell su(String cmd, String password, String promptExpression, ShellMatcher matcher) throws SshException, SshIOException, IOException, ShellTimeoutException
public ShellProcess sudo(String cmd, String password) throws SshException, ShellTimeoutException, IOException
public ShellProcess sudo(String cmd, String password, String promptExpression) throws SshException, ShellTimeoutException, IOException
public ShellProcess sudo(String cmd, String password, String promptExpression, ShellMatcher matcher) throws SshException, ShellTimeoutException, IOException
public boolean isClosed()
public void exit() throws IOException, SshException
IOException
SshException
public void close() throws IOException, SshException
IOException
SshException
public String getNewline()
public ShellProcess executeCommand(String origCmd) throws SshException
SshException
public ShellProcess executeCommand(String origCmd, boolean consume) throws SshException
SshException
public ShellProcess executeCommand(String origCmd, String charset) throws SshException
SshException
public ShellProcess executeCommand(String origCmd, boolean consume, String charset) throws SshException
SshException
public ShellProcess executeCommand(String origCmd, boolean matchPromptMarker, boolean consume) throws SshException
SshException
public ShellProcess executeCommand(String origCmd, boolean matchPromptMarker, boolean consume, String charset) throws SshException
SshException
public int getNumCommandsExecuted()
public int getOsType()
public String getOsDescription()
public SshClient getClient()
Copyright © 2024. All rights reserved.