Skip to content

SshClient

Source: src/services/ssh.ts

SshClient(transport: Leap0Transport)

Manages SSH access credentials for a sandbox.

  • Leap0Error: If API calls or response validation fail.
async createAccess(sandbox: SandboxRef, options: RequestOptions = {}): Promise<SshAccess>

Creates SSH credentials for a sandbox.

  • sandbox: Sandbox ID or sandbox-like object.
  • options: Optional request settings such as timeout and query params.
  • The generated SSH access payload.
async deleteAccess(sandbox: SandboxRef, options: RequestOptions = {}): Promise<void>

Deletes the active SSH credentials for a sandbox.

  • sandbox: Sandbox ID or sandbox-like object.
  • options: Optional request settings such as timeout and query params.
async validateAccess(sandbox: SandboxRef, accessId: string, password: string, options: RequestOptions = {}): Promise<SshValidation>

Verifies a previously issued SSH credential pair.

  • sandbox: Sandbox ID or sandbox-like object.
  • accessId: The SSH access ID to validate.
  • password: The password returned when the access credential was created.
  • options: Optional request settings such as timeout and query params.
  • The validation result.
async regenerateAccess(sandbox: SandboxRef, options: RequestOptions = {}): Promise<SshAccess>

Rotates SSH credentials for a sandbox.

  • sandbox: Sandbox ID or sandbox-like object.
  • options: Optional request settings such as timeout and query params.
  • The newly generated SSH access payload.