added README

This commit is contained in:
Philipp Kunz 2016-04-25 05:06:39 +02:00
parent f1babafd38
commit 044004701b
2 changed files with 23 additions and 3 deletions

20
README.md Normal file
View File

@ -0,0 +1,20 @@
# smartssh
setups SSH quickly and in a painless manner
> Attention: This is still alpha, so some things won't work
## Usage
```javascript
var smartssh = require("smartssh");
var sshInstance = new smartssh({
sshDir: "/some/path/.ssh", // the standard ssh directory, optional, defaults to "~./.ssh"
sshSync: true // sync ssh this instance will represent the status of an ssh dir if set to true;
});
sshInstance.addKey({
private: "somestring",
public: "somestring"
});
```

View File

@ -5,13 +5,13 @@ import helpers = require("./smartssh.classes.helpers");
export class ssh {
private sshDir:string;
private sshKeys:sshKey[];
private sync:boolean; // if set to true, the ssh dir will be kept in sync automatically
constructor(optionsArg:{sshDir?:string,sync?:boolean}={}){
private sshSync:boolean; // if set to true, the ssh dir will be kept in sync automatically
constructor(optionsArg:{sshDir?:string,sshSync?:boolean}={}){
this.sshDir = optionsArg.sshDir
this.sshDir ?
this.sshKeys = helpers.sshKeyArrayFromDir(this.sshDir)
: void(0);
this.sync = optionsArg.sync;
this.sshSync = optionsArg.sshSync;
};
}