Created
October 13, 2011 22:44
-
-
Save aolshevskiy/1285759 to your computer and use it in GitHub Desktop.
This file contains 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
import sbt._ | |
object TestBuild extends Build { | |
lazy val scalaSsh = file("../scala-ssh-shell") toURI | |
lazy val root = Project("root", file(".")) dependsOn(scalaSsh) | |
} |
This file contains 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
% 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. |
This file contains 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
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