SSH status
curl --request GET \
--url https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status', 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://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"pid": 123,
"host_key_fingerprint": "<string>"
}{
"error": "<string>",
"code": "<string>"
}SSH Lifecycle
SSH Status
Retrieve the sandbox’s internal SSH daemon status.
GET
/
api
/
v1
/
ssh
/
status
SSH status
curl --request GET \
--url https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status', 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://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{identifier}.sandbox.tensorlake.ai/api/v1/ssh/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"pid": 123,
"host_key_fingerprint": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Get the sandbox’s internal SSH server status.
The public sandbox proxy authenticates your API key and injects the internal forwarded-auth headers required by the daemon.
This endpoint reports the in-sandbox
sshd lifecycle used by Tensorlake’s SSH proxy. To connect with SSH as an end user, see SSH and PTY Sessions.Endpoint
GET /api/v1/ssh/status
Example Request
curl https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/ssh/status \
-H "Authorization: Bearer $TENSORLAKE_API_KEY"
Response
Tensorlake returns200 OK:
{
"enabled": true,
"pid": 123,
"host_key_fingerprint": "SHA256:..."
}
Was this page helpful?
⌘I