Last active
May 25, 2024 10:18
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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