Skip to Content
SSHSSH server

SSH server

Read SSH server settings for an app, then list users attached to that server.

Read server settings

Call client.apps.ssh.retrieve with the app ID. Check enabled before connecting users.

getAppSshServer.js
1
const sshServer = await client.apps.ssh.retrieve("da_XYZ");
2
// Should return: {// { ... }
6
console.log(sshServer.id, sshServer.enabled);

List SSH users

List users for the app. Each entry includes username, port, and serverHost / server_host for connections.

getAppSshServer.js
1
const users = await client.apps.ssh.users.list({ app: "da_XYZ", limit: 10 });
2
// Should return: {// { ... }
14
console.log(users.data);

Source: stackmachine/sdks  examples.