Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active May 25, 2024 10:18
Show Gist options
  • Save dacr/b3862817bd2b61d43409efee13469c9d to your computer and use it in GitHub Desktop.
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/1b32c5636d18be525fdedea72229e1ffcfcb6eef
// summary : hello world 1 through ssh
// keywords : scala, ssh, jsch, dsl, helloworld
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// 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