Interface | Description |
---|---|
Shell |
Shell.
|
Class | Description |
---|---|
Shell.Empty |
Without input and output.
|
Shell.Fake |
Fake shell for unit testing.
|
Shell.Plain |
With output only.
|
Shell.Safe |
Safe run (throws if exit code is not zero).
|
Shell.Verbose |
Verbose run.
|
Ssh |
Single SSH Channel.
|
SshByPassword |
SSH channel with authentication by password.
|
Sshd |
Test SSHD daemon (only for Linux).
|
Usage scenario is very simple:
String hello = new Shell.Plain( new SSH( "ssh.example.com", 22, "yegor", "-----BEGIN RSA PRIVATE KEY-----..." ) ).exec("echo 'Hello, world!'");
The only dependency you need is (check our latest version available at ssh.jcabi.com):
<depedency> <groupId>com.jcabi</groupId> <artifactId>jcabi-ssh</artifactId> </dependency>
Copyright © 2012–2018 jcabi.com. All rights reserved.