An execution of a shell command via SSH can be done in Java, in just a few lines, using jcabi-ssh: String hello = new Shell.Plain( new SSH( “ssh.example.com”, 22, “yegor”, “—–BEGIN RSA PRIVATE KEY—–…” ) ).exec(“echo ‘Hello, world!'”); jcabi-ssh is a convenient wrapper of JSch, a […]