added README
This commit is contained in:
parent
f1babafd38
commit
044004701b
20
README.md
Normal file
20
README.md
Normal 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"
|
||||||
|
});
|
||||||
|
|
||||||
|
```
|
@ -5,13 +5,13 @@ import helpers = require("./smartssh.classes.helpers");
|
|||||||
export class ssh {
|
export class ssh {
|
||||||
private sshDir:string;
|
private sshDir:string;
|
||||||
private sshKeys:sshKey[];
|
private sshKeys:sshKey[];
|
||||||
private sync:boolean; // if set to true, the ssh dir will be kept in sync automatically
|
private sshSync:boolean; // if set to true, the ssh dir will be kept in sync automatically
|
||||||
constructor(optionsArg:{sshDir?:string,sync?:boolean}={}){
|
constructor(optionsArg:{sshDir?:string,sshSync?:boolean}={}){
|
||||||
this.sshDir = optionsArg.sshDir
|
this.sshDir = optionsArg.sshDir
|
||||||
this.sshDir ?
|
this.sshDir ?
|
||||||
this.sshKeys = helpers.sshKeyArrayFromDir(this.sshDir)
|
this.sshKeys = helpers.sshKeyArrayFromDir(this.sshDir)
|
||||||
: void(0);
|
: void(0);
|
||||||
this.sync = optionsArg.sync;
|
this.sshSync = optionsArg.sshSync;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user