You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All methods return a AngularJS Promise. For more information about promises read [AngularJS documentation](https://docs.angularjs.org/api/ng/service/$q).
124
+
All methods except `storeSession`, `getSessions` and `getSession`, return a AngularJS Promise. For more information about promises read [AngularJS documentation](https://docs.angularjs.org/api/ng/service/$q).
120
125
121
-
All methods are based on cordova-plugin-sshclient methods, so read [plugin documentation](https://github.com/R3nPi2/cordova-plugin-sshclient) if your need more information.
126
+
All methods except `storeSession`, `getSessions` and `getSession`, are based on cordova-plugin-sshclient methods, so read [plugin documentation](https://github.com/R3nPi2/cordova-plugin-sshclient) if your need more information.
-`saveHostKey` – This argument should be a string matching "true" or "false". If "false", the verification should be done but hostkey will not be saved into known\_hosts database. If "true", hostkey should be saved into known\_hosts.
153
160
154
161
**Success response**
@@ -162,12 +169,13 @@ We should use this method to verify hostkeys.
-`knownHosts` – An array like the one returned from `getKnownHosts`: `knownHosts = [ { host: "example.com", type: "ssh-rsa", key: "AAAAB3NzaC1yc2EAAAA..." }, ... ]`
260
+
261
+
**Success response**
262
+
263
+
- Returns an array with known hosts found in `known_hosts` file.
-`terminal` – Current terminal content. This is a multiprupose field where we could store a javascript object, string, or whaterver we want. We can use this field later to get session state with `getSession`.
280
+
281
+
**Returned values**
282
+
283
+
- Returns `true`.
284
+
285
+
### `$ssh.getSession(sessionID)`
286
+
287
+
Pending documentation.
288
+
289
+
**Arguments**
290
+
291
+
-`sessionID` – The ID returned by `openSession`.
292
+
293
+
**Returned values**
294
+
295
+
- An object with session info: `{ alias: "myServer", hostname: "myserver.com", user: "me", terminal: "The terminal content..." }`
296
+
297
+
### `$ssh.getSessions()`
298
+
299
+
Pending documentation.
300
+
301
+
**Returned values**
302
+
303
+
- An array of objects indexed by `sessionID` with session info: `[ "sessionID": { alias: "myServer", hostname: "myserver.com", user: "me", terminal: "The terminal content..." }, ... ]`
0 commit comments