Barrack API Documentation
  1. ssh
Barrack API Documentation
  • Platform Documentation
    • "Authentication & Access"
    • "Getting Started"
    • "Platform Documentation"
    • "Troubleshooting"
    • vm
      • "Advanced Configuration"
      • "Boot Source Configuration"
      • "GPU Configuration"
      • "Region Selection"
      • "SSH Key Configuration"
      • "VM States & Billing"
    • storage
      • "Managing Volumes"
      • "Storage Management"
    • ssh
      • "Creating SSH Keys"
      • "Importing SSH Keys"
      • "Managing SSH Keys"
    • security
      • "Attaching Firewalls to VMs"
      • "Firewall Management"
      • "Firewall Rules"
    • dashboard
      • "Dashboard Overview"
      • "VM Management"
    • backup
      • "Creating Snapshots"
      • "Custom Images"
      • "Managing Snapshots"
      • "Restoring Snapshots"
      • "Snapshots Management"
    • account
      • "Credits System"
      • "Account Management"
  • Balance
    • Get credit balance
      GET
  • GPU Stocks
    • Get GPU stock availability
      GET
  • GPU Specs
    • Get GPU specifications
      GET
  • Regions
    • List available regions
      GET
  • Pricing
    • Get pricing information
      GET
    • Get pricing information
      POST
  • Deploy Instance
    • Create a new instance
      POST
  • Instance management
    • List instances
      GET
    • Delete instance
      DELETE
    • Get instance billing
      GET
    • Hibernate instance
      POST
    • Reboot instance
      POST
    • Restore hibernated instance
      POST
    • Start instance
      POST
    • Stop instance
      POST
    • Toggle public IP for instance
      POST
    • Get instance details
      GET
    • Get hibernated instances count
      GET
    • Add instance security rule
      POST
    • Remove instance security rule
      DELETE
  • OS Images
    • List OS images
  • SSH Keys
    • List SSH keys
    • Create SSH key
    • Get SSH key
    • Delete SSH key
  • Scripts
    • List all startup scripts
    • Create a startup script
    • Get startup script details
    • Update a startup script
    • Delete a startup script
    • Delete multiple startup scripts
  • Firewalls
    • List firewalls
    • Get firewall details
    • Attach firewall to instances
    • Get firewalls attached to instance
    • Delete firewall
    • Remove firewall rule
    • Add firewall rule
    • Create firewall
    • Get supported protocols
    • List instances available for firewall attachment
    • List instances available for firewall attachment
  • Snapshots
    • List snapshots
    • Get snapshot billing
    • List Instance eligible for snapshot creation
    • Get snapshot details
    • Delete snapshot
    • Restore snapshot
    • Create snapshot
    • Create snapshot
    • Get snapshot billing
  • Images
    • List custom images
    • Get image details
    • Delete custom image
    • Create image from snapshot
    • Get snapshot-image relationship
    • Get snapshot-image relationship list
  • AI Chat
    • Chat with AI
    • Get AI usage summary
    • Get AI usage history
    • Get available AI models
  • Volumes
    • Attach volumes to instance
    • Detach volumes from instance
    • Clone volume
    • Resize volume
    • Get volume billing
    • List available volume types
    • List volumes
    • Create volume
    • Get volume details
    • Delete volume
  • Virtual Machines
    • Get firewalls attached to instance
    • Remove instance security rule
    • List Instance eligible for snapshot creation
  • Schemas
    • AITransaction
    • AddFirewallRuleRequest
    • AddFirewallRuleResponse
    • AddVMSecurityRuleResponse
    • AttachFirewallRequest
    • AggregatedBillingResponse
    • AttachFirewallResponse
    • AttachVolumesRequest
    • AttachVolumesResponse
    • AttachedFirewall
    • BatchSnapshotImageRelationshipResponse
    • Balance
    • Billing
    • ChatCompletionsRequest
    • ChatCompletionsResponse
    • CloneVolumeRequest
    • BillingRecord
    • CloneVolumeResponse
    • BillingSummary
    • CreateFirewallRequest
    • CreateFirewallResponse
    • CreateImageFromSnapshotRequest
    • CreateSSHKeyRequest
    • CreateScriptRequest
    • CreateSnapshotRequest
    • CreateSnapshotResponse
    • CreateSSHKeyResponse
    • CurrencyEnum
    • Data
    • CreditBalanceResponse
    • DeleteFirewallResponse
    • CreateVolumeRequest
    • DeleteSnapshotResponse
    • CreateVolumeResponse
    • DeleteVMResponse
    • DetachVolumesRequest
    • DetachVolumesResponse
    • DeploymentRequest
    • DirectionEnum
    • DeploymentResponse
    • EthertypeEnum
    • ErrorResponse
    • FirewallAttachment
    • DeleteVolumeResponse
    • DeleteSSHKeyResponse
    • FirewallEnvironment
    • FirewallResponse
    • FirewallRule
    • FirewallVM
    • GetBatchSnapshotImageRelationshipsRequest
    • GetFirewallDetailsResponse
    • GPUStockConfiguration
    • GPUSpec
    • GetHibernatedVMsResponse
    • GPUStockItem
    • GPUSpecsResponse
    • GetSupportedProtocolsResponse
    • GPUStocksResponse
    • GetVMAttachedFirewallsResponse
    • GetVolumeTypesResponse
    • HibernateVMResponse
    • HibernationBillingMetrics
    • ListFirewallsResponse
    • ListUserVMsResponse
    • ListVMsResponse
    • ModelsResponse
    • GetSSHKeysResponse
    • Pagination
    • PricingRequest
    • OSImage
    • PricingResponse
    • OSImagesResponse
    • Protocol
    • GpuCountEnum
    • ProtocolEnum
    • Image
    • GpuModelEnum
    • GetVolumeDetailsResponse
    • RebootVMResponse
    • ImageCreateResponse
    • RecentHibernation
    • ImageDeleteResponse
    • GetVolumesWithNextNameResponse
    • RemoveFirewallRuleResponse
    • ImageDetailResponse
    • RemoveVMSecurityRuleResponse
    • Region
    • ImageListResponse
    • ResizeVolumeRequest
    • RegionsResponse
    • Price
    • ResizeVolumeResponse
    • ResourceTypeEnum
    • RestoreSnapshotRequest
    • RestoreSnapshotResponse
    • RestoreVMResponse
    • Snapshot
    • SnapshotImageRelationshipResponse
    • Specs
    • StartVMResponse
    • StopVMResponse
    • TierEnum
    • UpdateScriptRequest
    • UsageHistoryResponse
    • UsageSummaryResponse
    • RegionEnum
    • UserVM
    • VMDetailsResponse
    • VMFlavor
    • VMImage
    • VMInstance
    • VMResponse
    • SpecsMetadata
    • VMSecurityRule
    • VMSecurityRuleRequest
    • VMStatus
    • VMVolumeAttachment
    • Script
    • VolumeTypeEnum
    • SSHKeyResponse
    • ScriptListResponse
    • ToggleVMPublicIPResponse
    • VolumeBillingRecord
    • VolumeBillingSummary
    • VolumeHourlyBillingResponse
    • VolumeResponse
  1. ssh

"Creating SSH Keys"

SSH keys provide secure access to your virtual machines, replacing password-based authentication with more secure cryptographic keys. At least one SSH key is required for VM deployment.
To create a new SSH key:
1
Navigate to SSH Keys
Navigate to the SSH Keys page from the sidebar
2
Initiate Creation
Click "Create Key" button
3
Name Your Key
Enter a descriptive name for the key (maximum 50 characters):
Names must contain only letters, numbers, underscores, hyphens, and periods
Use descriptive names like "my-project-key" or "development-server"
Choose names that help identify the key's purpose
4
Generate Key
Click "Create Key" to generate the keypair:
System automatically generates a secure 2048-bit RSA public/private key pair
Private key file will automatically download to your computer
Public key is stored in your account for VM deployment

Key Generation Features#

Automatic Generation Process#

Secure Generation
Cryptographic Security
2048-bit RSA encryption for strong security
Cryptographically secure random generation
Industry-standard key format
Compatible with all SSH clients and servers
Instant Download
Secure Key Delivery
Private key automatically downloads during creation
Download happens only once for security
File is named with your chosen key name
Ready to use immediately with proper permissions

Platform Integration#

Seamless Integration
Multi-Region Distribution

Critical Security Notice#

Private Key Handling#

1
Immediate Download
Private key downloads automatically upon creation
2
Secure Storage
Move the downloaded key to a secure location (e.g., ~/.ssh/)
3
Set Permissions
Set correct file permissions for security
4
Create Backup
Create encrypted backups of important private keys

Setting Private Key Permissions#

After downloading your private key file, you must set the correct permissions for security:
Linux/MacOS
Windows
Set Secure Permissions
Example:
This command ensures only you can read and write the file, which is required for SSH security.

Key Naming Requirements#

Naming Rules and Validation#

Character Requirements
Length and Uniqueness
Best Practices

Key Limits and Restrictions#

Account Limitations#

Quantity Limits
Key Count Restrictions
Maximum of 25 SSH keys per region
Keys automatically distributed to all regions
Limit applies to total keys across account
Delete unused keys to free quota
Technical Specifications
Key Specifications
Generated keys use 2048-bit RSA encryption
Industry-standard OpenSSH format
Compatible with all major SSH clients
Suitable for all security requirements

Key Management Best Practices#

1
Plan Key Usage
Determine how many keys you need
Plan separate keys for different purposes
Consider team access requirements
Plan for key rotation schedules
2
Use Descriptive Names
Choose names that indicate key purpose
Include environment or project identifiers
Avoid generic or temporary names
Document key purposes and usage
3
Secure Key Storage
Store private keys in secure locations
Use encrypted storage for backups
Set proper file permissions
Never share private keys
4
Regular Maintenance
Review and audit key usage regularly
Remove unused or unnecessary keys
Rotate keys based on security policies
Monitor key access and usage patterns

Using Created SSH Keys#

VM Deployment Integration#

Automatic Selection
Multi-Key Deployment

Connection Examples#

Once your key is created and VM is deployed:
Basic Connection
SSH Config
Troubleshooting
Standard SSH Connection
Parameters:
-i specifies the private key file
ubuntu is the username (varies by OS)
vm-ip-address is your VM's public IP

Key Security Best Practices#

Generation Security#

Strong Generation
Secure Key Creation
Always use platform-generated keys for maximum security
2048-bit RSA provides excellent security for most use cases
Keys generated using cryptographically secure random sources
No need to generate keys manually unless specifically required
Unique Keys
Key Separation
Generate separate keys for different projects or environments
Use different keys for production and development
Consider separate keys for different team members
Avoid reusing keys across multiple purposes

Storage Security#

Local Storage
Backup Strategy
Access Control

Troubleshooting Key Creation#

Common Issues#

Download Problems
Naming Issues
Account Limits
Private Key Download Issues
Browser Settings: Check popup blockers and download settings
Antivirus: Verify antivirus isn't blocking downloads
Storage Space: Ensure sufficient disk space for download
Permissions: Check browser download folder permissions

Error Resolution#

1
Identify the Issue
Read error messages carefully
Check browser console for technical errors
Verify account status and limits
Test with different browsers if needed
2
Apply Appropriate Solution
Address specific error conditions
Clear browser cache if needed
Try alternative download methods
Contact support for persistent issues
3
Verify Success
Confirm private key downloaded successfully
Check key appears in SSH keys list
Test key with VM deployment
Verify key functionality with test connection
4
Secure the Key
Set proper file permissions immediately
Move key to secure location
Create backup if key is important
Document key purpose and usage
Previous
"Storage Management"
Next
"Importing SSH Keys"
Built with