Overview
IAM
- Account
- Users
- API Tokens
CDN
- IP addresses list
- CDN service
- Origins
- CDN resources
- CDN activity logs
- Log forwarding
- Log viewer
- Logs uploader
- Tools
- Rules
- Rule templates
- Purge history
- SSL certificates
- CA certificates
- CDN Statistics
- Advanced analytics
- Origin shielding
- Let's Encrypt certificates
Managed DNS
- Analyze
- Locations
- Lookup
- Metrics
- Pickers
- DNS Clients
- Zones
- DNSSEC
- RRsets
Cloud
- Bare Metal
- Container as a Service
- Cost Reports
- DDOS Protection
- File Shares
- Firewalls
- Floating IPs
- Function as a Service
- GPU Cloud
- IP Ranges
- Images
- Inference Instances
- Instances
- Load Balancers
- Logging
- Managed Kubernetes
- Managed PostgreSQL
- Networks
- Placement Groups
- Projects
- Quotas
- Regions
- Registry
- Reservations
- Reserved IPs
- Routers
- SSH Keys
- GETList keypairsdeprecated
- POSTImport or generate keypairdeprecated
- GETGet keypairdeprecated
- DELDelete keypairdeprecated
- PATCHShare keypair to view for all users in projectdeprecated
- GETList SSH keys
- POSTAdd or generate SSH key
- GETGet SSH key
- DELDelete SSH key
- PATCHShare or unshare SSH key with users
- GETList keypairsdeprecated
- POSTImport or generate keypairdeprecated
- GETGet keypairdeprecated
- DELDelete keypairdeprecated
- GET
- Secrets
- Service Endpoints
- Snapshot Schedules
- Snapshots
- Tasks
- User Actions
- User Role Assignments
- Volumes
Security
- Event Logs
- BGP announces
- Security Templates
- Profiles
FastEdge
- Apps
- Binaries
- FastEdge Clients
- FastEdge Secrets
- Stats
- FastEdge Templates
WAAP
- WAAP Service
- Domains
- Policies
- Analytics
- Custom Page Sets
- Custom Rules
- Firewall Rules
- Advanced Rules
- Tags
- Network Organizations
- API Discovery
- IP Spotlight
- Security Insights
Web Security
- Billing Statistics
- Resources
Video Streaming
- Streams
- Overlays
- Broadcasts
- Restreams
- Videos
- Subtitles
- Directories
- Playlists
- QualitySets
- Players
- AI
- Streaming Statistics
Object Storage
- Notifications
- Key
- Location
- Storage
- Storage Statistics
SSH Keys
Add or generate SSH key
To generate a key, omit the public_key
parameter from the request body
POST
/
cloud
/
v1
/
ssh_keys
/
{project_id}
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
ssh_key_created = client.cloud.ssh_keys.create(
project_id=1,
name="my-ssh-key",
)
print(ssh_key_created.id)
Copy
Ask AI
{
"created_at": "2025-06-16T17:05:50Z",
"fingerprint": "86:75:ce:e7:e9:1e:f0:79:ec:6f:d8:92:9b:43:fc:4d",
"id": "36a7a97a-0672-4911-8f2b-92cd4e5b0d91",
"name": "my-ssh-key",
"private_key": "<private_key>",
"project_id": 1,
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIjxL6g1II8NsO8odvBwGKvq2Dx/h/xrvsV9b9LVIYKm my-username@my-hostname",
"shared_in_project": true,
"state": "ACTIVE"
}
Authorizations
API key for authentication.
Path Parameters
Project ID
Examples:
1
Body
application/json
Response
201 - application/json
Created
The response is of type object
.
Was this page helpful?
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
ssh_key_created = client.cloud.ssh_keys.create(
project_id=1,
name="my-ssh-key",
)
print(ssh_key_created.id)
Copy
Ask AI
{
"created_at": "2025-06-16T17:05:50Z",
"fingerprint": "86:75:ce:e7:e9:1e:f0:79:ec:6f:d8:92:9b:43:fc:4d",
"id": "36a7a97a-0672-4911-8f2b-92cd4e5b0d91",
"name": "my-ssh-key",
"private_key": "<private_key>",
"project_id": 1,
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIjxL6g1II8NsO8odvBwGKvq2Dx/h/xrvsV9b9LVIYKm my-username@my-hostname",
"shared_in_project": true,
"state": "ACTIVE"
}
Assistant
Responses are generated using AI and may contain mistakes.