> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create SSH key

> Creates an SSH public key for SFTP storage access. These keys are used for passwordless authentication to SFTP storages.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/object_storage_api.yaml post /storage/v4/ssh_keys
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Object Storage API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 27c1b8c49488
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Notifications
  - name: S3-Compatible Storage
  - name: SFTP Storage
  - name: SSHKeys
  - name: Storage
  - name: Storage Locations
  - name: Storage Statistics
paths:
  /storage/v4/ssh_keys:
    post:
      tags:
        - SSHKeys
      summary: Create SSH key
      description: >-
        Creates an SSH public key for SFTP storage access. These keys are used
        for passwordless authentication to SFTP storages.
      operationId: createSshKeyV4
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SSHKeyCreateBodyV4'
        required: true
      responses:
        '201':
          description: SSHKeyV4
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSHKeyV4'
        '400':
          description: ErrResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
        '401':
          description: ErrResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
        '409':
          description: ErrResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
components:
  schemas:
    SSHKeyCreateBodyV4:
      title: SSHKeyCreateBodyV4 Request body for creating an SSH key.
      required:
        - name
        - public_key
      type: object
      properties:
        name:
          type: string
          description: User-defined name for the SSH key
          example: my-production-key
        public_key:
          type: string
          description: The SSH public key content (ssh-rsa or ssh-ed25519 format)
          example: ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com
    SSHKeyV4:
      title: >-
        SSHKeyV4 SSH public key for passwordless SFTP storage authentication.
        Link keys to SFTP storages via the storage update endpoint.
      required:
        - created_at
        - id
        - name
        - public_key
      type: object
      properties:
        created_at:
          type: string
          description: ISO 8601 timestamp when the SSH key was created
          format: date-time
          example: '2025-08-05T09:15:00Z'
        id:
          type: integer
          description: Unique identifier for the SSH key
          format: int64
          example: 123
        name:
          type: string
          description: User-defined name for the SSH key
          example: my-production-key
        public_key:
          type: string
          description: The SSH public key content
          example: ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com
    ErrResponse:
      type: object
      properties:
        error:
          type: string
      description: ErrResponse is an error response
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````