Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active February 3, 2026 20:20
Show Gist options
  • Select an option

  • Save dacr/b3862817bd2b61d43409efee13469c9d to your computer and use it in GitHub Desktop.

Select an option

Save dacr/b3862817bd2b61d43409efee13469c9d to your computer and use it in GitHub Desktop.
hello world 1 through ssh / published by https://github.com/dacr/code-examples-manager #7206dfaf-8300-48ac-abfe-c7330495996c/685a6c2e840296655fdd0013ea7334dd71f651a9
// summary : hello world 1 through ssh
// keywords : scala, ssh, jsch, dsl, helloworld
// publish : gist
// authors : David Crosson
// license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
// id : 7206dfaf-8300-48ac-abfe-c7330495996c
// created-on : 2023-11-17T23:47:48+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// ---------------------
//> using scala "3.4.2"
//> using dep "fr.janalyse::janalyse-ssh:1.1.0"
//> using lib "org.slf4j:slf4j-nop:2.0.9"
// ---------------------
jassh.SSH.once("127.0.0.1", "test") { ssh =>
println(ssh.execute("""echo "Hello World from $(hostname)" """))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment