jcabi-ssh

Simple SSH Client

License

License

BSD
GroupId

GroupId

com.jcabi
ArtifactId

ArtifactId

jcabi-ssh
Last Version

Last Version

1.6.1
Release Date

Release Date

Type

Type

jar
Description

Description

jcabi-ssh
Simple SSH Client
Project Organization

Project Organization

jcabi.com
Source Code Management

Source Code Management

https://github.com/jcabi/jcabi-ssh

Download jcabi-ssh

How to add to project

<!-- https://jarcasting.com/artifacts/com.jcabi/jcabi-ssh/ -->
<dependency>
    <groupId>com.jcabi</groupId>
    <artifactId>jcabi-ssh</artifactId>
    <version>1.6.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.jcabi/jcabi-ssh/
implementation 'com.jcabi:jcabi-ssh:1.6.1'
// https://jarcasting.com/artifacts/com.jcabi/jcabi-ssh/
implementation ("com.jcabi:jcabi-ssh:1.6.1")
'com.jcabi:jcabi-ssh:jar:1.6.1'
<dependency org="com.jcabi" name="jcabi-ssh" rev="1.6.1">
  <artifact name="jcabi-ssh" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.jcabi', module='jcabi-ssh', version='1.6.1')
)
libraryDependencies += "com.jcabi" % "jcabi-ssh" % "1.6.1"
[com.jcabi/jcabi-ssh "1.6.1"]

Dependencies

compile (6)

Group / Artifact Type Version
com.jcabi : jcabi-aspects jar 0.22.5
com.jcabi : jcabi-log jar 0.17.2
org.apache.commons : commons-lang3 jar 3.5
org.cactoos : cactoos jar 0.16
com.jcraft : jsch jar 0.1.54
org.apache.sshd : sshd-core Optional jar 1.6.0

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.16.10

test (1)

Group / Artifact Type Version
com.google.guava : guava jar 20.0

Project Modules

There are no modules declared in this project.

Donate via Zerocracy

EO principles respected here Managed by Zerocracy DevOps By Rultor.com

Build Status PDD status Maven Central Javadoc Dependencies

jpeek report

More details are here: ssh.jcabi.com. Also, read this blog post: Simple Java SSH Client.

It is a convenient SSH client for Java:

import com.jcabi.ssh.Shell;
import com.jcabi.ssh.Ssh;
Shell shell = new Ssh("example.com", 22, "username", "key...");
String stdout = new Shell.Plain(shell).exec("echo 'Hello, world!'");

The key here is your private SSH key, usually the one you have in ~/.ssh/id_rsa.

There is also a convenient SSHD class, a runner of ssh daemon, for unit testing:

try (Sshd sshd = new Sshd()) {
  String uptime = new Shell.Plain(
    Ssh(sshd.host(), sshd.login(), sshd.port(), sshd.key())
  ).exec("uptime");
}

Version 1.6 works under Java 1.8+. If your Java version is ealier, use version 1.5.2.

Questions?

If you have any questions about the framework, or something doesn't work as expected, please submit an issue here.

How to contribute?

Fork the repository, make changes, submit a pull request. We promise to review your changes same day and apply to the master branch, if they look correct.

Please run Maven (3.2+) build before submitting a pull request:

$ mvn clean install -Pqulice

Make sure you have Java version 7 or higher.

com.jcabi

jcabi.com

Small java components

Versions

Version
1.6.1
1.6
1.5.2
1.5.1
1.5
1.4
1.3
1.2.1
1.2
1.1
1.0