Skip to content

Commit a36cf9c

Browse files
committed
first commit
0 parents  commit a36cf9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3727
-0
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.jar
2+
*.class
3+
dist/*
4+
target/
5+
*.pscala
6+
*~
7+
.classpath
8+
.project
9+
.cache
10+
.settings
11+
images/
12+
*.png
13+
nohup.out
14+

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
------------------------------------------------------------------
2+
JASSH - JANALYSE-SSH - SCALA SSH API : README FILE
3+
Crosson David - [email protected]
4+
------------------------------------------------------------------
5+
6+
To turn on/off ssh root direct access or sftp ssh subsystem.
7+
Subsystem sftp ... (add or remove comment)
8+
PermitRootLogin yes or no (of course take care of security constraints)
9+
10+
AIX SSHD CONFIGURATION :
11+
vi /system/products/openssh/conf/sshd_config
12+
/etc/rc.d/rc2.d/S99sshd reload
13+
14+
LINUX SSHD CONFIGURATION
15+
vi /etc/ssh/sshd_config
16+
/etc/init.d/sshd reload
17+
18+
SOLARIS SSHD CONFIGURATION
19+
vi /usr/local/etc/ssh/sshd_config
20+
???/lib/svc/method/sshd restart ???
21+

RELEASE-NOTES

Lines changed: 349 additions & 0 deletions
Large diffs are not rendered by default.

build.sbt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name := "janalyse-ssh"
2+
3+
version := "0.9.12"
4+
5+
organization :="fr.janalyse"
6+
7+
organizationHomepage := Some(new URL("http://www.janalyse.fr"))
8+
9+
scalaVersion := "2.10.3"
10+
11+
scalacOptions ++= Seq( "-deprecation", "-unchecked", "-feature")
12+
13+
//crossScalaVersions := Seq("2.10.2")
14+
15+
libraryDependencies ++= Seq(
16+
"com.typesafe" %% "scalalogging-slf4j" % "1.0.1"
17+
,"com.jcraft" % "jsch" % "0.1.50"
18+
,"org.apache.commons" % "commons-compress" % "1.7"
19+
,"org.scalatest" %% "scalatest" % "2.0" % "test"
20+
,"junit" % "junit" % "4.11" % "test"
21+
,"com.github.scala-incubator.io" %% "scala-io-core" % "0.4.2" % "test"
22+
,"com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2" % "test"
23+
)
24+
25+
publishTo := Some(
26+
Resolver.sftp(
27+
"JAnalyse Repository",
28+
"www.janalyse.fr",
29+
"/home/tomcat/webapps-janalyse/repository"
30+
) as("tomcat", new File(util.Properties.userHome+"/.ssh/id_rsa"))
31+
)

cleanup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
find . -name "*~" -exec rm {} \;
4+
for d in . onejar ; do
5+
(cd $d ; rm -fr target project/target project/boot project/project nohup.out .settings .cache .classpath .project)
6+
done

onejar/build.sbt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import AssemblyKeys._
2+
3+
seq(assemblySettings: _*)
4+
5+
name := "janalyse-ssh-onejar"
6+
7+
scalaVersion := "2.10.2"
8+
9+
mainClass in assembly := Some("fr.janalyse.ssh.Main")
10+
11+
jarName in assembly := "jassh.jar"
12+
13+
libraryDependencies <++= scalaVersion { sv =>
14+
("org.scala-lang" % "jline" % sv % "compile") ::
15+
("org.scala-lang" % "scala-compiler" % sv % "compile") ::
16+
("org.scala-lang" % "scalap" % sv % "compile") ::Nil
17+
}
18+
19+
libraryDependencies += "fr.janalyse" %% "janalyse-ssh" % "0.9.11" % "compile"
20+
21+
resolvers += "JAnalyse Repository" at "http://www.janalyse.fr/repository/"
22+
23+
24+
// jansi is embedded inside jline !
25+
excludedJars in assembly <<= (fullClasspath in assembly) map { cp =>
26+
cp filter {c=> List("jansi") exists {c.data.getName contains _} }
27+
}

onejar/project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.9.0")
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package fr.janalyse.ssh
2+
3+
object Main {
4+
def main(args:Array[String]) {
5+
6+
val extendedargs = Array(
7+
"-Yrepl-sync", // Always the same thread used for each REPL evaluated lines
8+
"-usejavacp",
9+
"-nocompdaemon",
10+
"-savecompiled",
11+
"-deprecation"
12+
) ++ args
13+
14+
scala.tools.nsc.MainGenericRunner.main(extendedargs)
15+
}
16+
}

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")
2+

scripts/dummy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
exec java -jar jassh.jar "$0" "$@"
3+
!#
4+
jassh.SSH.shell("localhost", "test", "testtest") { sh =>
5+
print(sh.execute("""echo "Hello World from `hostname`" """))
6+
}

0 commit comments

Comments
 (0)