openstage-ssh

0.0.1 • Public • Published

openstage-ssh

Enables OpenStage Phone SSH shell temporarily via WBM.

util = require 'util'
OpenStageSsh = require 'OpenStageSsh'
 
ossh = new OpenStageSsh('openstage''secret'true) # Hostname, Password, debugging 
 
ossh.getState (state) -> 
    console.log "SSH State:" + state # Either true or false 
 
    if state
        ossh.disable -> 
            console.log "Disabled SSH."
        
    else
        ossh.enable 110(res) -> 
            console.log "Enabled SSH. Settings: " + util.inspect res
            
            ossh.getState (res) -> 
                console.log "3 EXT RESULT=" + res
 
ossh.on 'connectTimeout'(hostname) ->
    console.log "No new SSH-Connections could be established anymore to #{hostname}."
 
ossh.on 'sessionTimeout'(hostname) ->
    console.log "SSH was killed automatically on device #{hostname}."
 

Readme

Keywords

none

Package Sidebar

Install

npm i openstage-ssh

Weekly Downloads

0

Version

0.0.1

License

BSD-2-Clause

Last publish

Collaborators

  • sja