{"meta":{"title":"SSH 서명 키에 대한 REST API 엔드포인트","intro":"REST API를 사용하여 인증된 사용자의 SSH 서명 키를 관리합니다.","product":"REST API","breadcrumbs":[{"href":"/ko/rest","title":"REST API"},{"href":"/ko/rest/users","title":"사용자"},{"href":"/ko/rest/users/ssh-signing-keys","title":"SSH 서명 키"}],"documentType":"article"},"body":"# SSH 서명 키에 대한 REST API 엔드포인트\n\nREST API를 사용하여 인증된 사용자의 SSH 서명 키를 관리합니다.\n\n## SSH 서명 키 관리 정보\n\n요청 URL에 `{username}` 매개 변수가 포함되어 있지 않으면 응답은 로그인한 사용자에 대한 것입니다(요청과 함께 [인증 정보](/ko/rest/authentication/authenticating-to-the-rest-api)를 전달해야 함). 사용자가 2단계 인증을 사용하도록 설정했는지 여부와 같은 추가 개인 정보는 기본 인증 또는 를 통해`user` 인증될 때 포함됩니다.\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## List SSH signing keys for the authenticated user\n\n```\nGET /user/ssh_signing_keys\n```\n\nLists the SSH signing keys for the authenticated user's GitHub account.\nOAuth app tokens and personal access tokens (classic) need the read:ssh\\_signing\\_key scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **304** - Not modified\n\n* **401** - Requires authentication\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/user/ssh_signing_keys\n```\n\n**Response schema (Status: 200):**\n\nArray of `SSH Signing Key`:\n\n* `key`: required, string\n* `id`: required, integer\n* `title`: required, string\n* `created_at`: required, string, format: date-time\n\n## Create a SSH signing key for the authenticated user\n\n```\nPOST /user/ssh_signing_keys\n```\n\nCreates an SSH signing key for the authenticated user's GitHub account.\nOAuth app tokens and personal access tokens (classic) need the write:ssh\\_signing\\_key scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Body parameters\n\n* **`title`** (string)\n  A descriptive name for the new key.\n\n* **`key`** (string) (required)\n  The public SSH key to add to your GitHub account. For more information, see \"Checking for existing SSH keys.\"\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **304** - Not modified\n\n* **401** - Requires authentication\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/user/ssh_signing_keys \\\n  -d '{\n  \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n  \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\"\n}'\n```\n\n**Response schema (Status: 201):**\n\n* `key`: required, string\n* `id`: required, integer\n* `title`: required, string\n* `created_at`: required, string, format: date-time\n\n## Get an SSH signing key for the authenticated user\n\n```\nGET /user/ssh_signing_keys/{ssh_signing_key_id}\n```\n\nGets extended details for an SSH signing key.\nOAuth app tokens and personal access tokens (classic) need the read:ssh\\_signing\\_key scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`ssh_signing_key_id`** (integer) (required)\n  The unique identifier of the SSH signing key.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **304** - Not modified\n\n* **401** - Requires authentication\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/user/ssh_signing_keys/SSH_SIGNING_KEY_ID\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Create a SSH signing key for the authenticated user](#create-a-ssh-signing-key-for-the-authenticated-user).\n\n## Delete an SSH signing key for the authenticated user\n\n```\nDELETE /user/ssh_signing_keys/{ssh_signing_key_id}\n```\n\nDeletes an SSH signing key from the authenticated user's GitHub account.\nOAuth app tokens and personal access tokens (classic) need the admin:ssh\\_signing\\_key scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`ssh_signing_key_id`** (integer) (required)\n  The unique identifier of the SSH signing key.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **304** - Not modified\n\n* **401** - Requires authentication\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/user/ssh_signing_keys/SSH_SIGNING_KEY_ID\n```\n\n**Response schema (Status: 204):**\n\n## List SSH signing keys for a user\n\n```\nGET /users/{username}/ssh_signing_keys\n```\n\nLists the SSH signing keys for a user. This operation is accessible by anyone.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`username`** (string) (required)\n  The handle for the GitHub user account.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/users/USERNAME/ssh_signing_keys\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List SSH signing keys for the authenticated user](#list-ssh-signing-keys-for-the-authenticated-user)."}