public final class SSHByPassword extends Object implements Shell
For SSH channel with authenticaton using private key.Shell.Empty, Shell.Plain, Shell.Safe, Shell.Verbose| Constructor and Description |
|---|
SSHByPassword(String adr,
int prt,
String user,
String passwd)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
exec(String command,
InputStream stdin,
OutputStream stdout,
OutputStream stderr)
Execute and return exit code.
|
public SSHByPassword(String adr, int prt, String user, String passwd) throws UnknownHostException
adr - IP addressprt - Port of serveruser - Loginpasswd - PasswordUnknownHostException - If failspublic int exec(String command, InputStream stdin, OutputStream stdout, OutputStream stderr) throws IOException
Shellexec in interface Shellcommand - Commandstdin - Stdin (will be closed)stdout - Stdout (will be closed)stderr - Stderr (will be closed)IOException - If failsCopyright © 2012–2015 jcabi.com. All rights reserved.