List user SSH keys
curl --request GET \
--url https://cloud-api.phala.com/api/v1/user/ssh-keysimport requests
url = "https://cloud-api.phala.com/api/v1/user/ssh-keys"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cloud-api.phala.com/api/v1/user/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://cloud-api.phala.com/api/v1/user/ssh-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://cloud-api.phala.com/api/v1/user/ssh-keys"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud-api.phala.com/api/v1/user/ssh-keys")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.phala.com/api/v1/user/ssh-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"user_id": "<string>",
"name": "<string>",
"public_key": "<string>",
"fingerprint": "<string>",
"key_type": "<string>",
"source": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"key_metadata": {},
"last_synced_at": "<string>"
}
]SSH Keys
List user SSH keys
Returns all SSH keys belonging to the authenticated user.
GET
/
api
/
v1
/
user
/
ssh-keys
List user SSH keys
curl --request GET \
--url https://cloud-api.phala.com/api/v1/user/ssh-keysimport requests
url = "https://cloud-api.phala.com/api/v1/user/ssh-keys"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cloud-api.phala.com/api/v1/user/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://cloud-api.phala.com/api/v1/user/ssh-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://cloud-api.phala.com/api/v1/user/ssh-keys"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud-api.phala.com/api/v1/user/ssh-keys")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.phala.com/api/v1/user/ssh-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"user_id": "<string>",
"name": "<string>",
"public_key": "<string>",
"fingerprint": "<string>",
"key_type": "<string>",
"source": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"key_metadata": {},
"last_synced_at": "<string>"
}
]Response
List of SSH keys
Key hashid
Owner user hashid
Human-readable name
OpenSSH format public key
SHA256 fingerprint
Algorithm (ed25519, rsa, etc)
Origin: manual or github
Creation timestamp
Last update timestamp
Extra data like bit length
Last GitHub sync timestamp
Was this page helpful?

