Skip to content

SSH server

Enable SSH and read server settings for an app.

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.jsssh_server.py
const sshServer = await client.apps.ssh.retrieve("da_XYZ");
// Should return: {
console.log(sshServer.id, sshServer.enabled);
server = client.apps.ssh.retrieve("da_XYZ")
# Should return: {
print(server.id, server.enabled)

List SSH users

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

getAppSshServer.jsssh_server.py
const users = await client.apps.ssh.users.list({ app: "da_XYZ", limit: 10 });
// Should return: {
console.log(users.data);
users = client.apps.ssh.users.list(app="da_XYZ", limit=10)
# Should return: {
print(users.data)

Source: stackmachine/sdks examples.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close