List SSH keys on a server
curl --request GET \
--url https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-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.rafftechnologies.com/api/v1/vms/{id}/ssh-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"keys": [
{
"fingerprint": "SHA256:KH7zm92O0/dbuPCSkvuS9zdDvBneuFaHt+qwZbp8OYU",
"type": "ssh-ed25519",
"comment": "you@laptop",
"has_options": true,
"saved_key_id": "<string>",
"saved_key_name": "<string>",
"public_key": "<string>"
}
],
"read_at": "2023-11-07T05:31:56Z",
"changed": 123,
"saved_key_id": "<string>"
}
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}SSH keys
List SSH Keys on a VM
The keys in root’s authorized_keys on a running Linux server, read from the server itself through its QEMU guest agent (a few seconds). Each key is named after your saved key with the same fingerprint; a key someone added on the server itself has no saved key. SSH keys are managed on Linux servers only. Needs vm.view.
GET
/
api
/
v1
/
vms
/
{id}
/
ssh-keys
List SSH keys on a server
curl --request GET \
--url https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-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.rafftechnologies.com/api/v1/vms/{id}/ssh-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"keys": [
{
"fingerprint": "SHA256:KH7zm92O0/dbuPCSkvuS9zdDvBneuFaHt+qwZbp8OYU",
"type": "ssh-ed25519",
"comment": "you@laptop",
"has_options": true,
"saved_key_id": "<string>",
"saved_key_name": "<string>",
"public_key": "<string>"
}
],
"read_at": "2023-11-07T05:31:56Z",
"changed": 123,
"saved_key_id": "<string>"
}
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}{
"success": false,
"error": "The QEMU guest agent is not running on web-01. Install and start qemu-guest-agent in the server, then try again.",
"reason": "not_linux"
}Updated October 21, 2026
Last modified on October 21, 2026