Clone or download
Latest commit b59be25 Jun 15, 2018
Failed to load latest commit information.
.github .github templates Feb 8, 2018
src #73 fixed Jun 15, 2018
.0pdd.yml 0pdd config Jan 29, 2018
.gitattributes gitattributes Jun 22, 2015
.gitignore text Sep 5, 2017
.pdd .pdd added Dec 22, 2016
.rultor.yml #65 rultor java 8 Sep 5, 2017
.travis.yml only java 8 Dec 24, 2017
LICENSE.txt Up to 2017, Happy New Year! Jan 5, 2017 donate badge Mar 23, 2018
jcabi-ssh.iml #65 java 8 Sep 5, 2017
pom.xml #65 java 8 Sep 5, 2017

Donate via Zerocracy

EO principles respected here Managed by Zerocracy DevOps By

Build Status PDD status Maven Central Javadoc Dependencies

jpeek report

More details are here: 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("", 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.login(), sshd.port(), sshd.key())

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


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.