Options
All
  • Public
  • Public/Protected
  • All
Menu

This class is used by the various handlers in the project as the base class for their implementation.

Hierarchy

  • SshBaseHandler

Implements

  • any

Index

Properties

Protected mArguments

mArguments: ICommandArguments

Command line arguments passed

Protected mHandlerParams

mHandlerParams: IHandlerParameters

Full set of command handler parameters from imperative

Protected mSession

mSession: SshSession

The session creating from the command line arguments / profile

Accessors

console

data

format

progress

Methods

Private attachHostKeyVerifier

  • Attaches an interactive host key verifier to the session so that, when the SSH server presents a host key that is not already trusted, the user is asked to confirm it before any credentials are sent (trust on first use). The accepted key is then persisted to the ssh profile so the user is not prompted again. In non-interactive / CI environments the key is never prompted for: verification stays on and the connection fails with an explanatory error instead of hanging.

    Parameters

    • session: SshSession

      the session to attach the verifier to

    • commandParameters: IHandlerParameters

      command parameters, used for prompting and persistence

    Returns void

fail

Private persistHostKey

  • Persists an accepted host key into the active ssh team-config profile, so the user is not prompted again on subsequent connections. Best effort: if no team config exists, autoStore is disabled, or the ssh profile cannot be resolved, the key is simply not saved (the user will be prompted again).

    Parameters

    • commandParameters: IHandlerParameters

      command parameters, used to resolve the active ssh profile

    • hostKey: string

      the base64-encoded host key to store

    Returns Promise<void>

process

Abstract processCmd

Generated using TypeDoc