Skip to main content
POST
/
servers
/
{server_id}
/
out_of_band_connection
Go (SDK)
package main

import(
	"context"
	"os"
	latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
	"github.com/latitudesh/latitudesh-go-sdk/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := latitudeshgosdk.New(
        latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
    )

    res, err := s.Servers.StartOutOfBandConnection(ctx, "sv_059EqYX2dQj8p", operations.CreateServerOutOfBandServersRequestBody{
        Data: operations.CreateServerOutOfBandServersData{
            Type: operations.CreateServerOutOfBandServersTypeOutOfBand,
            Attributes: &operations.CreateServerOutOfBandServersAttributes{
                SSHKeyID: latitudeshgosdk.Pointer("ssh_w49QDB55qagKb"),
            },
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.OutOfBandConnection != nil {
        // handle response
    }
}
{
  "data": {
    "id": "obc_mw49QDB5qagKb",
    "type": "out_of_band",
    "attributes": {
      "ssh_key": {
        "id": "ssh_w49QDB55qagKb",
        "description": "oberbrunner.test",
        "fingerprint": "7d:46:c6:b5:ca:28:43:5e:b9:2c:61:9e:fc:a6:5d:59"
      },
      "created_at": "2025-07-16T18:36:57+00:00",
      "username": "server-1",
      "credentials": {
        "user": "phillip_legros",
        "password": "g5gyubdn5p"
      },
      "port": "2222",
      "access_ip": "189.1.2.0",
      "server_id": "sv_059EqYX2dQj8p",
      "status": "connected"
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

server_id
string
required

Body

data
object
required

Response

201 - application/vnd.api+json

Created

data
object