keystore-manager

A keystore manager backed by Java KeyStore on file system as default storage

License

License

Categories

Categories

IDE Development Tools KeY Data Data Formats Formal Verification
GroupId

GroupId

com.github.mideo
ArtifactId

ArtifactId

keystore-manager_2.11
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

keystore-manager
A keystore manager backed by Java KeyStore on file system as default storage
Project URL

Project URL

https://github.com/MideO/sssh
Project Organization

Project Organization

com.github.mideo
Source Code Management

Source Code Management

https://github.com/MideO/sssh

Download keystore-manager_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.mideo/keystore-manager_2.11/ -->
<dependency>
    <groupId>com.github.mideo</groupId>
    <artifactId>keystore-manager_2.11</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.mideo/keystore-manager_2.11/
implementation 'com.github.mideo:keystore-manager_2.11:0.0.3'
// https://jarcasting.com/artifacts/com.github.mideo/keystore-manager_2.11/
implementation ("com.github.mideo:keystore-manager_2.11:0.0.3")
'com.github.mideo:keystore-manager_2.11:jar:0.0.3'
<dependency org="com.github.mideo" name="keystore-manager_2.11" rev="0.0.3">
  <artifact name="keystore-manager_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.mideo', module='keystore-manager_2.11', version='0.0.3')
)
libraryDependencies += "com.github.mideo" % "keystore-manager_2.11" % "0.0.3"
[com.github.mideo/keystore-manager_2.11 "0.0.3"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.12

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.11 jar 3.0.4

Project Modules

There are no modules declared in this project.

sssh

Build Status

Maven Central

A Simple scala ssh library

import java.io.InputStream
import com.typesafe.config.ConfigFactory

object main extends App {
 //Create credentials from config
  val configString =
    """
    ssh {
      credentials = [
        {
          alias = testhost
          host = myhostname
          user = username
          password = changeme
        },
        {
          alias = testhost1
          host = myhostname1
          user = username1
          identity = "path/to/key.pem"
        }
      ]
    }
    """
 
  sssh.credentials = sssh.Credentials.from(ConfigFactory.load("default.conf"))
  
  //or configLike String 
  sssh.credentials = sssh.Credentials.from(ConfigFactory.parseString(configString))
  
  //or Create credentials directly
  sssh.credentials = Credential("testAlias", "testHost", "user", Some("pass"), Some(Paths.get(".ssh/key.pem"))
 
    
  //execute command
  sssh.execute("pwd")
  
  //execute scpFrom remote file
   sssh.scpFrom("wget-log")
  
  //or Create credentials directly from List
  sssh.credentials = List(Credential("testAlias", "testHost", "user", Some("pass"), Some(Paths.get("PATH/To/key.pub"))), Credential("testAlias1", "testHost1", "user1", Some("pass1"), None))
  
  //execute command on single host
  sssh.execute("pwd", "testAlias")

  //execute scpTo for file in current working directory
  sssh.scpTo("build.sbt")
  
  //execute scpTo from input stream 
  val in: InputStream = getClass.getClassLoader.getResourceAsStream("default.conf")
  sssh.scpTo("default.conf", in)

  //execute sudo command
  sssh.sudo("whoami")
}

Versions

Version
0.0.3
0.0.1