Barrack API Documentation
  1. vm
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
  • Instance management
    • List instances
    • Delete instance
    • Get instance billing
    • Hibernate instance
    • Reboot instance
    • Restore hibernated instance
    • Start instance
    • Stop instance
    • Toggle public IP for instance
    • Get instance details
    • Get hibernated instances count
    • Add instance security rule
    • Remove instance security rule
  • 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. vm

"SSH Key Configuration"

SSH keys provide secure access to your virtual machines. SSH key management requires user authentication.

Managing SSH Keys#

Access your SSH keys through the platform interface:
Automatic Loading
Seamless Integration
SSH keys are automatically loaded when authenticated
Keys are displayed in the deployment interface
Multiple keys can be selected for team access
Regional distribution is handled automatically
Key Selection
Flexible Key Assignment
Keys are automatically selected if you have only one available
Multiple keys can be selected for single VM
Team members can use different keys
Keys remain associated with VMs after deployment

Creating SSH Keys#

Generate new SSH key pairs directly through the platform interface.

Key Generation Process#

1
Access SSH Keys
Navigate to SSH Keys section
2
Initiate Creation
Click "Create Key" in the SSH key management interface
3
Name Your Key
Enter a unique name for the key (1-50 characters):
Use descriptive names like "my-project-key" or "development-server"
Names must contain only letters, numbers, underscores, hyphens, and periods
Choose names that help identify the key's purpose
4
Generate and Download
Click "Create Key" to generate the keypair:
System generates a secure 2048-bit RSA public/private key pair
Private key file automatically downloads to your computer
Public key is stored in your account

Key Generation Features#

Automatic Generation
Instant Download
Platform Integration

Critical Security Notice#

Importing Existing SSH Keys#

Import SSH keys that you already use for other services.

Import Process#

1
Access Import Function
Navigate to SSH Keys and click "Import Key"
2
Name Your Key
Enter a descriptive name for the key (maximum 50 characters):
Use names like "github-key" or "laptop-ssh-key"
Names must contain only letters, numbers, underscores, hyphens, and periods
Choose names that identify the key's source or purpose
3
Paste Public Key
Paste your public key content in the text area:
Key must begin with ssh-rsa, ssh-ed25519, or similar
Include the entire public key on a single line
Include optional comment if desired
4
Import Key
Click "Import Key" to add it to your account:
System validates key format
Key is added to your account immediately
Available for VM deployment right away

Finding Your Public Key#

Locate your existing public key on your system:
Linux/MacOS
Windows
Common Public Key Locations
Your public key is typically located at:
Display and copy your public key:

Public Key Format Requirements#

Understanding the correct format for import:
Valid public key requirements:
Must begin with key type: ssh-rsa, ssh-ed25519, or ssh-dss
Contains a long base64-encoded string of characters
Optionally ends with a comment (usually email address or description)
Must be on a single line with no line breaks

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.

SSH Key Limits and Restrictions#

Key Limits
Account Restrictions
Maximum of 25 SSH keys per region
Key names must be unique within your account
Generated keys use 2048-bit RSA encryption
Keys are automatically distributed to all regions upon creation
Naming Requirements
Key Naming Rules
1-50 characters maximum length
Letters, numbers, underscores, hyphens, periods only
Must be unique within your account
Use descriptive names for easy identification

Supported Key Types#

The platform supports industry-standard SSH key types:
RSA Keys
Ed25519 Keys
ECDSA Keys

SSH Connection Examples#

Once your keys are configured, use them to connect to your VMs:

Basic SSH Connection#

Parameter explanations:
/path/to/private_key - Path to your downloaded private key file
username - Default user for your OS (ubuntu, centos, admin, etc.)
vm_ip_address - Public IP address of your VM

Username by Operating System#

Ubuntu Images
Other Linux
Default Username: ubuntu
All Ubuntu-based OS images use the ubuntu user by default.

SSH Config File (Recommended)#

For easier connections, add entries to your SSH config file (~/.ssh/config):
After adding this configuration, you can connect simply with:

Key Selection During VM Deployment#

During VM deployment, you can configure SSH key access:

Single Key Selection#

1
Automatic Selection
If you have only one SSH key, it's automatically selected
2
Manual Selection
If you have multiple keys, choose the appropriate one for the VM
3
Key Validation
System validates key availability and format
4
VM Integration
Selected keys are automatically installed on the VM during provisioning

Multiple Key Selection#

Team Access
Multiple Key Benefits
Allow access by different team members
Each person uses their own SSH key
Individual access control and auditing
No shared credentials needed
Backup Access
Redundant Access
Multiple keys provide backup access
Different keys for different purposes
Reduced risk of lockout
Flexible access management

Regional Key Distribution#

SSH keys are automatically distributed across all available regions when created or imported:
Automatic Distribution
Available Regions
Seamless Regional Access
Keys automatically available in all regions
No manual distribution required
Consistent access across deployments
Simplified multi-region operations

SSH Key Best Practices#

Security Best Practices#

Key Generation
Key Storage
Key Maintenance
Access Control

Operational Best Practices#

1
Plan Key Strategy
Determine key naming conventions
Plan for different environments (dev, staging, prod)
Consider team access requirements
Plan key rotation schedule
2
Implement Key Management
Create keys with descriptive names
Set up secure key storage
Document key purposes and usage
Train team on key security practices
3
Monitor and Maintain
Track key usage and access patterns
Regular security audits of key access
Remove unused keys promptly
Update key documentation regularly
4
Scale Security
Implement automated key rotation where possible
Use configuration management for key distribution
Monitor for unauthorized key usage
Plan for emergency key replacement procedures
Previous
"Region Selection"
Next
"VM States & Billing"
Built with