edgeport - v1.0.3
    Preparing search index...

    Function test

    • One-shot: connects, runs a command as a predicate, and closes the session.

      Parameters

      • opts: SshConnectOptions & { command: string }

        Connect options plus the command to run.

      Returns Promise<boolean>

      true if the command exited 0, else false.

      If the connection or handshake fails.

      If authentication is rejected.

      1.0.2

      import { test } from 'edgeport/ssh';
      const ok = await test({ hostname: 'h', username: 'u', password: 'p', command: 'command -v git' });