JASSH (JAnalyseSSH) 0.7.2 released
JASSH is a high level scala SSH API for easy and fast operations on remote servers. ( ** project page **)
Latest changes :- added a package object jassh to define shortcuts to fr.janalyse.ssh.SSH class and object
- SSHOptions, host parameter is now in first position !
These small changes enable even simpler scripts :
hello scala script
#!/bin/sh
exec java -jar jassh.jar -nocompdaemon -usejavacp -savecompiled "$0" "$@"
!#
println(jassh.SSH.shell("localhost", "test", Some("testtest")) { _ execute "echo -n Hello `hostname`"})
remote vmstat scala script
#!/bin/sh
exec java -jar jassh.jar -nocompdaemon -usejavacp -savecompiled "$0" "$@"
!#
jassh.SSH.once("localhost", "test", password=Some("testtest")) {
_.run("vmstat 1 10", println(_.getOrElse("")).waitForEnd
}