---
updatedAt: 2026-06-08T17:28:02.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/linode-api/llms.txt
---

# Get an SSH key

Returns a single SSH Key object identified by `id` that you have access to view.


**Permissions and scopes**

To call this operation, you need the following:

- **Identity and access permissions**. Your user needs a role with these permissions assigned. [Learn more](https://techdocs.akamai.com/cloud-computing/docs/identity-access-cm-available-roles).
  - Permissions: `view_profile_ssh_key`
- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).

  - Scopes: `account:read_only`


**CLI**

```shell
linode-cli sshkeys view 42
```

[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)

# OpenAPI definition

````json
{
  "components": {
    "securitySchemes": {
      "oauth": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://login.linode.com/oauth/authorize",
            "scopes": {
              "account:read_only": "Allows access to GET information about your account.",
              "account:read_write": "Allows access to all endpoints related to your account.",
              "child_account:read_only": "Allows access to GET information about deprecated parent/child operations.",
              "child_account:read_write": "Allows access to deprecated parent/child operations.",
              "databases:read_only": "Allows access to GET information about databases.",
              "databases:read_write": "Allows access to all endpoints related to databases.",
              "domains:read_only": "Allows access to GET Domains on your account.",
              "domains:read_write": "Allows access to all Domain endpoints.",
              "events:read_only": "Allows access to GET your Events.",
              "events:read_write": "Allows access to all endpoints related to your Events.",
              "firewall:read_only": "Allows access to GET information about your Firewalls.",
              "firewall:read_write": "Allows access to all Firewall endpoints.",
              "images:read_only": "Allows access to GET your Images.",
              "images:read_write": "Allows access to all endpoints related to your Images.",
              "ips:read_only": "Allows access to GET your ips.",
              "ips:read_write": "Allows access to all endpoints related to your ips.",
              "linodes:read_only": "Allows access to GET Linodes on your account.",
              "linodes:read_write": "Allow access to all endpoints related to your Linodes.",
              "lke:read_only": "Allows access to GET LKE Clusters on your account.",
              "lke:read_write": "Allows access to all endpoints related to LKE Clusters on your account.",
              "longview:read_only": "Allows access to GET your Longview Clients.",
              "longview:read_write": "Allows access to all endpoints related to your Longview Clients.",
              "monitor:read_only": "Allows access to Monitor (Akamai Cloud Pulse) data.",
              "monitor:read_write": "Allows access to GET Monitor (Akamai Cloud Pulse) data.",
              "nodebalancers:read_only": "Allows access to GET NodeBalancers on your account.",
              "nodebalancers:read_write": "Allows access to all NodeBalancer endpoints.",
              "object_storage:read_only": "Allows access to GET information related to your Object Storage.",
              "object_storage:read_write": "Allows access to all Object Storage endpoints.",
              "stackscripts:read_only": "Allows access to GET your StackScripts.",
              "stackscripts:read_write": "Allows access to all endpoints related to your StackScripts.",
              "volumes:read_only": "Allows access to GET your Volumes.",
              "volumes:read_write": "Allows access to all endpoints related to your Volumes.",
              "vpc:read_write": "Allows access to all endpoints related to VPC and Subnet creation, updating, and deletion."
            },
            "tokenUrl": "https://login.linode.com/oauth/token"
          }
        },
        "type": "oauth2"
      },
      "personalAccessToken": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "description": "See documentation for Akamai's Linode API",
    "url": "https://techdocs.akamai.com/linode-api/reference"
  },
  "info": {
    "description": "\"[Read the API documentation](https://techdocs.akamai.com/linode-api/reference/api).\"",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Profile",
    "version": "4.229.1"
  },
  "openapi": "3.0.1",
  "paths": {
    "/{apiVersion}/profile/sshkeys/{sshKeyId}": {
      "get": {
        "description": "Returns a single SSH Key object identified by `id` that you have access to view.\n\n\n**Permissions and scopes**\n\nTo call this operation, you need the following:\n\n- **Identity and access permissions**. Your user needs a role with these permissions assigned. [Learn more](https://techdocs.akamai.com/cloud-computing/docs/identity-access-cm-available-roles).\n  - Permissions: `view_profile_ssh_key`\n- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).\n\n  - Scopes: `account:read_only`\n\n\n**CLI**\n\n```shell\nlinode-cli sshkeys view 42\n```\n\n[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Linode API",
          "url": "https://techdocs.akamai.com/linode-api/reference/get-ssh-key"
        },
        "operationId": "get-ssh-key",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created": "2024-01-01T00:01:01",
                  "id": 42,
                  "label": "Example SSH Key",
                  "ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@hostname"
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "An SSH key that serves as a credential to authenticate a user's secure shell connection to a Linode.",
                  "properties": {
                    "created": {
                      "description": "__Read-only__ The date this key was added.",
                      "example": "2018-01-01T00:01:01",
                      "readOnly": true,
                      "type": "string"
                    },
                    "id": {
                      "description": "__Read-only__ The unique identifier of an SSH Key object.",
                      "example": 42,
                      "readOnly": true,
                      "type": "integer"
                    },
                    "label": {
                      "description": "__Filterable__ A label for the SSH Key.",
                      "example": "My SSH Key",
                      "maxLength": 64,
                      "minLength": 0,
                      "type": "string",
                      "x-akamai": {
                        "labels": [
                          "Filterable"
                        ]
                      },
                      "x-linode-filterable": true
                    },
                    "ssh_key": {
                      "description": "The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.\n\nAccepted formats:\n\n- ssh-dss\n- ssh-rsa\n- ecdsa-sha2-nistp\n- ssh-ed25519\n- sk-ecdsa-sha2-nistp256 (Akamai-specific)",
                      "example": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer",
                      "format": "ssh-key",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/ssh-key.yaml"
                  }
                }
              }
            },
            "description": "An SSH Key object."
          },
          "default": {
            "content": {
              "application/json": {
                "example": {
                  "errors": [
                    {
                      "reason": "Invalid JSON"
                    }
                  ]
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "errors": {
                      "description": "Any warnings associated with a response.",
                      "items": {
                        "additionalProperties": false,
                        "description": "An object for describing a single error that occurred during the processing of a request.",
                        "properties": {
                          "field": {
                            "description": "The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as `null` if the error is not specific to any single element of the request.",
                            "example": "fieldname",
                            "type": "string"
                          },
                          "reason": {
                            "description": "What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to [Open a support ticket](https://techdocs.akamai.com/linode-api/reference/post-ticket) or perform some other action before you can complete the request successfully.",
                            "example": "fieldname must be a valid value",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/error-object.yaml"
                        }
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes."
          }
        },
        "security": [
          {
            "personalAccessToken": []
          },
          {
            "oauth": [
              "account:read_only"
            ]
          }
        ],
        "summary": "Get an SSH key",
        "tags": [
          "SSH keys"
        ],
        "x-akamai": {
          "tabs": [
            {
              "syntax": "linode-cli sshkeys view 42",
              "title": "CLI",
              "url": "https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli"
            }
          ]
        },
        "x-linode-cli-action": "view",
        "x-linode-iam": [
          {
            "permissions": [
              "view_profile_ssh_key"
            ]
          }
        ]
      },
      "parameters": [
        {
          "description": "__Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta.",
          "in": "path",
          "name": "apiVersion",
          "required": true,
          "schema": {
            "enum": [
              "v4",
              "v4beta"
            ],
            "example": "v4",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/api-version-path.yaml"
          }
        },
        {
          "description": "The ID of the SSHKey.",
          "in": "path",
          "name": "sshKeyId",
          "required": true,
          "schema": {
            "example": 725,
            "type": "integer"
          },
          "x-akamai": {
            "file-path": "parameters/ssh-key-id-path.yaml"
          }
        }
      ],
      "x-akamai": {
        "file-path": "paths/profile-ssh-key.yaml",
        "path-info": "/{apiVersion}/profile/sshkeys/{sshKeyId}"
      },
      "x-linode-cli-command": "sshkeys"
    }
  },
  "servers": [
    {
      "url": "https://api.linode.com"
    }
  ],
  "tags": [
    {
      "description": "Manage SSH keys for your user account. When creating a Linode, you can choose to have one or more SSH keys automatically added to the new Linode for secure access.",
      "name": "SSH keys"
    }
  ],
  "x-akamai": {
    "auth-type": "OAUTH",
    "file-path": "profile.yaml"
  },
  "x-readme": {
    "apply-tag-changes": true,
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
````

# Sibling pages

* [Add an SSH key](https://techdocs.akamai.com/linode-api/reference/post-add-ssh-key.md)
* [List SSH keys](https://techdocs.akamai.com/linode-api/reference/get-ssh-keys.md)
* [Update an SSH key](https://techdocs.akamai.com/linode-api/reference/put-ssh-key.md)
* [Delete an SSH key](https://techdocs.akamai.com/linode-api/reference/delete-ssh-key.md)