Skip to content

Instantly share code, notes, and snippets.

@aolshevskiy
Created October 13, 2011 22:44
Show Gist options
  • Save aolshevskiy/1285759 to your computer and use it in GitHub Desktop.
Save aolshevskiy/1285759 to your computer and use it in GitHub Desktop.
import sbt._
object TestBuild extends Build {
lazy val scalaSsh = file("../scala-ssh-shell") toURI
lazy val root = Project("root", file(".")) dependsOn(scalaSsh)
}
% ssh -p 4444 localhost
siasia@localhost's password:
Connected to test, starting repl...
Welcome to Scala version 2.9.1.final (Oracle JRockit(R), Java 1.6.0_20).
Type in expressions to have them evaluated.
Type :help for more information.
test> OtherObject
res0: OtherObject.type = OtherObject$@15c1a156
test> OtherObject.test
res1: java.lang.String = test
test> Bye.
Connection to localhost closed.
import scala.concurrent.ops.spawn
object OtherObject {
def test = "test"
}
object Test {
def main(args: Array[String]) {
val shell = new peak6.util.ScalaSshShell(4444, "test", "siasia", "test", Some("/test.ssh.keys"))
spawn {
shell.start()
}
new java.util.Scanner(System.in) nextLine()
shell.stop()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment