Java

jcabi-ssh

Java SSH client (an object-oriented wrapper around JSch)

J

jcabi

Dernière activité 24 sept. 2026
jcabi/jcabi-ssh

260

étoiles

88

forks

32

issues ouvertes

javajava-ssh-clientsshssh-client

Ce README est souvent en anglais.

Logo

EO principles respected here DevOps By Rultor.com

mvn PDD status Maven Central Javadoc codecov Hits-of-Code jpeek report License Codacy Badge

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 earlier, use version 1.5.2.

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 Maven 3.3+ and Java 8+.

Projets similaires

fork of the popular jsch library

Javajavajschopenssh
Mmwiede
1,1 k étoiles194

ssh, scp and sftp for java

Javajavascpsftp
Hhierynomus
2,7 k étoiles620

Apache MINA sshd is a comprehensive Java library for client- and server-side SSH.

Javaapachejavalibrary
Aapache
1,1 k étoiles400