edgeport - v1.0.3
    Preparing search index...

    Function connect

    • Opens an SSH session: connects, runs the transport handshake, authenticates, and returns a session ready for SshSession.exec, SshSession.shell, or SshSession.subsystem.

      Parameters

      Returns Promise<SshSession>

      The authenticated session.

      If the connection or handshake fails.

      If authentication is rejected.

      If negotiation fails (e.g. no common cipher).

      1.0.0

      import { connect } from 'edgeport/ssh';

      await using ssh = await connect({ hostname: 'h', username: 'u', password: 'p' });
      const { stdout } = await ssh.exec('ls -la');