Last active
February 3, 2026 20:22
-
-
Save dacr/d655f00ed01f12411c02672f89e49ac4 to your computer and use it in GitHub Desktop.
hello world 2 through ssh / published by https://github.com/dacr/code-examples-manager #91da1865-2b00-4737-a425-a2cda8b9c7e7/32407cd06eb1b586175874f98517d1bed7eac22d
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 2 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 : 91da1865-2b00-4737-a425-a2cda8b9c7e7 | |
| // created-on : 2023-11-18T00:03:42+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.shell("localhost", "test") { sh => | |
| import sh.* | |
| println(s"initial directory is $pwd") | |
| cd("/tmp") | |
| println(s"now it is $pwd") | |
| println(echo("Hello world !")) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment