solarnetwork-api-core
    Preparing search index...

    Class SshSession

    A SolarSSH session object.

    Implements

    Index

    Constructors

    • Constructor.

      Parameters

      • created: string | number | Date

        the creation date, or a number of string suitable for passing to the Date constructor

      • sessionId: string

        the unique session ID

      • nodeId: number

        the node ID

      • sshHost: string

        the SSH host name

      • sshPort: number

        the SSH port

      • reverseSshPort: number

        the reverse SSH port

      • OptionalstartInstructionId: number

        the StartRemoteSsh instruction ID

      • OptionalstopInstructionId: number

        the StopRemoteSsh instruction ID

      Returns SshSession

    Properties

    created: Date
    nodeId: number
    reverseSshPort: number
    sessionId: string
    sshHost: string
    sshPort: number
    startInstructionId?: number
    stopInstructionId?: number

    Methods

    • Get this object in standard JSON form.

      An example result looks like this:

      {
      "sessionId": "123-abc",
      "created": 123456789,
      "nodeId": 123,
      "host": "ssh.solarnetwork.net",
      "port": 9082,
      "reversePort": 42000
      }

      If the data value has a toJsonObject() function, that will be invoked and used in the result. Otherwise the data value will be included as-is.

      Returns Record<string, any>

      an object, ready for JSON encoding