Skip to content

Commit 1e72724

Browse files
committed
Merge branch 'release/0.5.0'
2 parents bc67e67 + fa41423 commit 1e72724

File tree

17 files changed

+283
-16
lines changed

17 files changed

+283
-16
lines changed

README.markdown

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ It builds on [sshj] to provide the following features:
1111

1212
## Installation
1313

14-
There is no official release yet. Publishing of release artifacts on <http://scala-tools.org> is pending.
15-
If you use [SBT] you will be able to pull in the _scala-ssh_ artifacts with:
14+
The current release is *0.5.0*, it's available from <http://repo.spray.cc>.
15+
If you use [SBT] you can pull in the _scala-ssh_ artifacts with:
16+
17+
resolvers += "spray repo" at "http://repo.spray.cc"
1618

1719
libraryDependencies += "com.decodified" %% "scala-ssh" % "0.5.0"
1820

1921
[sshj] uses [SLF4J] for logging, so you might want to also add [logback] to your dependencies:
2022

21-
libraryDependencies += "ch.qos.logback" % "logback-classic" % "0.9.29"
23+
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.0.0"
2224

2325
Additionally, in many cases you will need the following two artifacts, which provide additional cypher and compression
2426
support:
@@ -124,4 +126,5 @@ _scala-ssh_ project under the project’s open source license.
124126
[sshj]: https://github.com/shikhar/sshj
125127
[SBT]: https://github.com/harrah/xsbt/wiki
126128
[SLF4J]: http://www.slf4j.org/
127-
[logback]: http://logback.qos.ch/
129+
[logback]: http://logback.qos.ch/
130+
[APL 2.0]: http://www.apache.org/licenses/LICENSE-2.0

build.sbt

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,65 @@
11
name := "scala-ssh"
22

3+
version := "0.5.0"
4+
35
organization := "com.decodified"
46

5-
version := "0.5.0-SNAPSHOT"
7+
organizationHomepage := Some(new URL("http://decodified.com"))
8+
9+
description := "A Scala library providing remote shell access via SSH"
10+
11+
homepage := Some(new URL("https://github.com/sirthias/scala-ssh"))
12+
13+
startYear := Some(2011)
14+
15+
licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
616

717
scalaVersion := "2.9.1"
818

19+
scalacOptions := Seq("-deprecation", "-encoding", "utf8")
20+
921
libraryDependencies ++= Seq(
10-
"net.schmizz" % "sshj" % "0.6.1",
11-
"org.slf4j" % "slf4j-api" % "1.6.1",
22+
"net.schmizz" % "sshj" % "0.7.0",
23+
"org.slf4j" % "slf4j-api" % "1.6.4",
1224
"org.bouncycastle" % "bcprov-jdk16" % "1.46" % "provided",
1325
"com.jcraft" % "jzlib" % "1.0.7" % "provided",
14-
"org.specs2" %% "specs2" % "1.6.1" % "test",
15-
"ch.qos.logback" % "logback-classic" % "0.9.29" % "test"
26+
"org.specs2" %% "specs2" % "1.7.1" % "test",
27+
"ch.qos.logback" % "logback-classic" % "1.0.0" % "test"
1628
)
1729

1830
resolvers ++= Seq(
19-
"Akka Repository" at "http://akka.io/repository/",
20-
"Jsch Reposiroty" at "http://jsch.sourceforge.net/maven2/"
21-
)
31+
"Akka repo" at "http://akka.io/repository/"
32+
)
33+
34+
35+
///////////////
36+
// publishing
37+
///////////////
38+
39+
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
40+
41+
publishMavenStyle := true
42+
43+
publishTo <<= version { version =>
44+
Some {
45+
"spray nexus" at {
46+
// public uri is repo.spray.cc, we use an SSH tunnel to the nexus here
47+
"http://localhost:42424/content/repositories/" + {
48+
if (version.trim.endsWith("SNAPSHOT")) "snapshots/" else"releases/"
49+
}
50+
}
51+
}
52+
}
53+
54+
55+
///////////////
56+
// ls-sbt
57+
///////////////
58+
59+
seq(lsSettings:_*)
60+
61+
(LsKeys.tags in LsKeys.lsync) := Seq("ssh")
62+
63+
(LsKeys.docsUrl in LsKeys.lsync) := Some(new URL("https://github.com/sirthias/scala-ssh/"))
64+
65+
(externalResolvers in LsKeys.lsync) := Seq("spray repo" at "http://repo.spray.cc")

notes/0.5.0.markdown

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
_scala-ssh_ is a Scala library providing remote shell access via SSH.
2+
It builds on [sshj][] to provide the following features:
3+
4+
* Remote execution of one or more shell commands
5+
* Access to `stdin`, `stdout`, `stderr` and exitcode of remote shell commands
6+
* Authentication via password or public key
7+
* Host key verification via `known_hosts` file or explicit fingerprint
8+
* Convenient configuration of remote host properties via config file, resource or directly in code
9+
* Scala-idiomatic API
10+
11+
[sshj]: https://github.com/shikhar/sshj

notes/about.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_scala-ssh_ is a Scala library providing remote shell access via SSH.

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.11.0
1+
sbt.version=0.11.2

project/plugins.sbt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.1")
2+
3+
resolvers ++= Seq(
4+
"less is" at "http://repo.lessis.me",
5+
"coda" at "http://repo.codahale.com"
6+
)

src/main/ls/0.5.0.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
{
3+
"organization":"com.decodified",
4+
"name":"scala-ssh",
5+
"version":"0.5.0",
6+
"description":"A Scala library providing remote shell access via SSH",
7+
"site":"https://github.com/sirthias/scala-ssh",
8+
"tags":["ssh"],
9+
"docs":"https://github.com/sirthias/scala-ssh/",
10+
"licenses": [{
11+
"name": "Apache 2",
12+
"url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
13+
}],
14+
"resolvers": ["http://repo.spray.cc"],
15+
"dependencies": [{
16+
"organization":"net.schmizz",
17+
"name": "sshj",
18+
"version": "0.7.0"
19+
},{
20+
"organization":"org.slf4j",
21+
"name": "slf4j-api",
22+
"version": "1.6.4"
23+
},{
24+
"organization":"org.bouncycastle",
25+
"name": "bcprov-jdk16",
26+
"version": "1.46"
27+
},{
28+
"organization":"com.jcraft",
29+
"name": "jzlib",
30+
"version": "1.0.7"
31+
}],
32+
"scalas": ["2.9.1"],
33+
"sbt": false
34+
}

src/main/scala/com/decodified/scalassh/Command.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (C) 2011 Mathias Doenitz
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.decodified.scalassh
218

319
import net.schmizz.sshj.connection.channel.direct.Session

src/main/scala/com/decodified/scalassh/HostConfig.scala

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (C) 2011 Mathias Doenitz
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.decodified.scalassh
218

319
import net.schmizz.sshj.{DefaultConfig, Config}
@@ -77,13 +93,16 @@ abstract class FromStringsHostConfigProvider extends HostConfigProvider {
7793
}
7894

7995
private def keyfileLogin(settings: Map[String, String], source: String) = {
96+
import PublicKeyLogin._
8097
setting("username", settings, source).right.map { user =>
8198
val keyfile = setting("keyfile", settings, source).right.toOption
8299
val passphrase = setting("passphrase", settings, source).right.toOption
83100
PublicKeyLogin(
84101
user,
85102
passphrase.map(SimplePasswordProducer),
86-
keyfile.map(_ :: Nil).getOrElse(PublicKeyLogin.DefaultKeyLocations)
103+
keyfile.map { kf =>
104+
if (kf.startsWith("+")) kf.tail :: DefaultKeyLocations else kf :: Nil
105+
}.getOrElse(DefaultKeyLocations)
87106
)
88107
}
89108
}

src/main/scala/com/decodified/scalassh/PasswordProducer.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (C) 2011 Mathias Doenitz
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.decodified.scalassh
218

319
import net.schmizz.sshj.userauth.password.{Resource, PasswordFinder}

0 commit comments

Comments
 (0)