Copy
from gravixlayer import GravixLayer
client = GravixLayer()
runtime = client.runtime.create(template="python-3.12-base-small")
# Enable SSH first
client.runtime.enable_ssh(runtime.runtime_id)
# Check status
status = client.runtime.ssh_status(runtime.runtime_id)
print(status.enabled) # True
# Disable SSH
client.runtime.disable_ssh(runtime.runtime_id)
# Verify
status = client.runtime.ssh_status(runtime.runtime_id)
print(status.enabled) # False
client.runtime.kill(runtime.runtime_id)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
runtime_id | string | Yes | Runtime identifier |
Disable SSH as soon as interactive access is no longer needed.

