curl --request POST \
--url https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ssh_key_ids": [
"77777777-7777-4777-8777-777777777777"
]
}
'import requests
url = "https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys"
payload = { "ssh_key_ids": ["77777777-7777-4777-8777-777777777777"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ssh_key_ids: ['77777777-7777-4777-8777-777777777777']})
};
fetch('https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ssh_key_ids' => [
'77777777-7777-4777-8777-777777777777'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys"
payload := strings.NewReader("{\n \"ssh_key_ids\": [\n \"77777777-7777-4777-8777-777777777777\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ssh_key_ids\": [\n \"77777777-7777-4777-8777-777777777777\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ssh_key_ids\": [\n \"77777777-7777-4777-8777-777777777777\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "33333333-3333-4333-8333-333333333333",
"node_id": "33333333-3333-4333-8333-333333333333",
"reservation_id": "11111111-1111-4111-8111-111111111111",
"packet_id": "88888888-8888-4888-8888-888888888888",
"packet_ids": [
"88888888-8888-4888-8888-888888888888"
],
"ssh_key_ids": [
"77777777-7777-4777-8777-777777777777"
]
}{
"detail": {
"code": "ssh_key_ids_invalid",
"message": "Choose at least one SSH key, each only once."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "ssh_key_not_owned",
"message": "That SSH key belongs to another account."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "cluster_worker_keys_blocked",
"message": "SSH keys cannot be pushed while this node is in a Kubernetes or Slurm cluster. Tear the cluster down first."
}
}{
"error": "rate_limited",
"retry_after": 42,
"detail": "Too many requests. Try again in 42 seconds."
}{
"code": "<string>",
"detail": "<string>"
}Push SSH keys to a machine
Assigns the listed organization keys to the machine’s reservation if needed, then queues the reservation’s full key set for this machine. Pass the host node ID, which is a Bare Metal node’s node_id or a VM’s node_id from the reservation VM list (not the VM’s own id). Ornn updates that host and the reservation’s VMs on it. Use this to re-send keys after a machine was offline or a delivery failed. A 200 response means delivery was queued, not installed; poll the node and wait for the key’s fingerprint in authorized_key_fingerprints. Machines in a Kubernetes or Slurm cluster are rejected.
curl --request POST \
--url https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ssh_key_ids": [
"77777777-7777-4777-8777-777777777777"
]
}
'import requests
url = "https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys"
payload = { "ssh_key_ids": ["77777777-7777-4777-8777-777777777777"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ssh_key_ids: ['77777777-7777-4777-8777-777777777777']})
};
fetch('https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ssh_key_ids' => [
'77777777-7777-4777-8777-777777777777'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys"
payload := strings.NewReader("{\n \"ssh_key_ids\": [\n \"77777777-7777-4777-8777-777777777777\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ssh_key_ids\": [\n \"77777777-7777-4777-8777-777777777777\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/nodes/{node_id}/push-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ssh_key_ids\": [\n \"77777777-7777-4777-8777-777777777777\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "33333333-3333-4333-8333-333333333333",
"node_id": "33333333-3333-4333-8333-333333333333",
"reservation_id": "11111111-1111-4111-8111-111111111111",
"packet_id": "88888888-8888-4888-8888-888888888888",
"packet_ids": [
"88888888-8888-4888-8888-888888888888"
],
"ssh_key_ids": [
"77777777-7777-4777-8777-777777777777"
]
}{
"detail": {
"code": "ssh_key_ids_invalid",
"message": "Choose at least one SSH key, each only once."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "ssh_key_not_owned",
"message": "That SSH key belongs to another account."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "cluster_worker_keys_blocked",
"message": "SSH keys cannot be pushed while this node is in a Kubernetes or Slurm cluster. Tear the cluster down first."
}
}{
"error": "rate_limited",
"retry_after": 42,
"detail": "Too many requests. Try again in 42 seconds."
}{
"code": "<string>",
"detail": "<string>"
}ornn ssh-keys assignments sync <reservation-id> pushes the assigned keys to every machine in the reservation.Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
The host node ID (a Bare Metal node_id, or a VM's node_id) on a reservation your organization holds. A VM's own id returns 404 node_not_found.
Body
Active organization keys to assign to the machine's reservation before delivery.
1Optional delivery ID for your own correlation. Omit it to let Ornn generate one. If you send it, use a new value for every push; reusing a value for the same machine returns the earlier delivery instead of queuing the current key set.
Response
Key delivery is queued for the machine.
The machine ID from the request path.
The physical node that hosts the machine.
One queued delivery ID per updated VM or host.
The reservation's full key set that was queued.
The first queued delivery ID, or null when nothing was queued.
Was this page helpful?