Skip to main content
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

ParameterTypeRequiredDescription
runtime_idstringYesRuntime identifier
Disable SSH as soon as interactive access is no longer needed.