SSH

Switch SSH on or off

Turns SSH on or off for this computer. On, the computer runs an SSH server reachable only through the platform’s jump host, and accepts the keys of every owner and member of the account — not those of a person whose invitation is unaccepted, who is suspended or whose seat is suspended, and none while the account is suspended (see key_count); off, the server stops, the key file is removed and open SSH sessions are closed. No restart either way.

A computer made from a template image that predates SSH cannot run it: the setting is stored and the answer says available: false. Create a new computer from the current template instead.

If the computer’s hypervisor cannot be reached the setting is still stored, the answer says pending: true, and it is delivered when the hypervisor is back — at the latest when somebody next connects or reads this setting.

Connecting to a suspended computer resumes it — a start like any other, charged and refusable by your plan. A stopped computer refuses the connection; start it first.

Requires the member role or higher.

put/computers/{id}/ssh

Request

  • Base URL: https://app.mandala.computer/api/v1
  • URL: https://app.mandala.computer/api/v1/computers/{id}/ssh
  • Auth: HTTP bearer

Path parameters

idstring required

The computer id.

Request body

enabledboolean required

true to switch SSH on, false to switch it off.

Response

The setting as stored.

computerstring required

The computer this is about.

enabledboolean required

Whether SSH is switched on for this computer. Off until somebody switches it on.

availableboolean nullable required

Whether this computer can run SSH at all. false for a computer made from a template image that predates SSH — create a new computer from the current template to use it. null when the computer has not been asked yet; it is asked when it next starts.

pendingboolean required

Whether the computer’s hypervisor has yet to receive the current setting and key list. It is sent again automatically; a connection attempt sends it first.

key_countinteger required

How many keys may log in: every key of every owner and member of the account, except keys added through an API key or connected app on a different account, and except the keys of a person whose invitation is not yet accepted, who is suspended, or whose seat is suspended. None at all while the account itself is suspended. 0 while SSH is off.

keys_pushedinteger required

How many of those the computer is given. The same as key_count unless the account holds more keys than one computer accepts (200); then the keys of the members who joined most recently, and each person’s newest keys, are the ones left out, and connecting with one of them is refused.

errorstring nullable required

Set when the computer’s hypervisor refused the current setting. It is not sent again until a key or this setting changes; pending is false meanwhile. null otherwise.

Changes

No recorded changes to this operation across all 1 revision of this API.