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

"Managing SSH Keys"

The SSH Keys page provides comprehensive tools for managing your credentials throughout their lifecycle, from creation to deletion.

Key Information Display#

Key Details
Essential Information
View key name, fingerprint, and creation date
Access the full public key content
Copy public keys to clipboard with one click
View regional distribution of keys
Organization Features
Management Tools
Search keys by name
Filter keys by region
Sort by name or creation date
Paginated view for large key collections

Key Information Components#

Basic Information
Technical Details
Usage Information
Core Key Details
Key Name: User-defined identifier
Key Type: RSA, Ed25519, or ECDSA
Key Size: Bit length for security assessment
Creation Date: When key was added to account
Source: Whether created or imported

Deleting SSH Keys#

To remove an SSH key from your account:
1
Navigate to Key Management
Navigate to the SSH Keys page
2
Locate Target Key
Find the key you want to delete using search or filters
3
Initiate Deletion
Click the "Delete" button on the key card
4
Confirm Deletion
Confirm the deletion in the popup dialog
5
Verify Removal
The key will be immediately removed from all regions

Key Deletion Considerations#

Pre-Deletion Checklist#

VM Access Verification
Access Continuity
Documentation Update

Using SSH Keys with Virtual Machines#

SSH keys are automatically integrated into the VM deployment process:

VM Deployment Integration#

1
Key Selection
In the SSH Key Configuration section of VM deployment, select from your available keys
2
Multi-Key Selection
Multiple keys can be selected for a single VM to allow access by different team members
3
Automatic Installation
Selected keys are automatically installed on the VM during provisioning
4
User Configuration
Keys are configured for the default user account (ubuntu, centos, etc. depending on OS)

Connection Examples#

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
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: ssh my-vm

Regional Key Distribution#

SSH keys are automatically distributed across all available regions when created or imported:

Regional Availability#

Norway Region
NORWAY-1
European data center
GDPR compliant
Low latency for European users
Canada Region
CANADA-1
North American data center
Privacy-focused
Optimized for Canadian/northern US users
US Region
US-1
United States data center
US data residency
Low latency for US users

Cross-Region Benefits#

Seamless Deployment
Disaster Recovery

SSH Key Best Practices#

Security Best Practices#

1
Key Generation
Generate separate keys for different projects or environments
Use descriptive names that identify the key's purpose
Prefer Ed25519 keys for new generations (more secure and faster)
Use minimum 2048-bit RSA keys (4096-bit recommended for high security)
2
Key Storage
Store private keys securely and never share them
Use passphrase protection for your private keys
Back up private keys in encrypted storage
Set correct file permissions (600 for private keys)
3
Key Maintenance
Regularly audit and rotate your SSH keys
Remove unused or unnecessary keys promptly
Monitor key usage and access patterns
Keep an inventory of where keys are deployed
4
Access Control
Use separate keys for different team members
Implement key rotation policies
Revoke access immediately when team members leave
Consider using SSH certificates for large teams

Operational Best Practices#

Key Organization
Lifecycle Management
Team Collaboration

Troubleshooting Common Issues#

Connection Problems#

Permission Denied
Connection Refused
Key Not Found
SSH Authentication Failures
Common Causes:
Wrong private key file
Incorrect file permissions
Wrong username for OS
Key not installed on VM
Solutions:
Verify correct private key file path
Set permissions: chmod 600 ~/.ssh/private_key.pem
Use correct username (ubuntu, centos, etc.)
Check key was selected during VM deployment

Key Management Issues#

Cannot Delete Key
Key Not Working
Lost Private Key

Advanced Key Management#

Key Rotation Strategy#

1
Plan Rotation Schedule
Determine rotation frequency based on security requirements
Identify high-priority keys requiring frequent rotation
Plan rotation windows to minimize service disruption
Coordinate with team schedules and maintenance windows
2
Prepare New Keys
Generate or import new SSH keys
Test new keys with development VMs
Update team access and documentation
Prepare deployment procedures
3
Deploy New Keys
Add new keys to existing VMs
Verify new key functionality
Update automation and scripts
Train team on new key usage
4
Retire Old Keys
Remove old keys from VMs
Delete old keys from account
Update documentation and procedures
Verify no remaining dependencies

Automation Integration#

Infrastructure as Code
Automated Key Management
Include SSH key management in infrastructure automation
Use configuration management tools for key deployment
Implement automated key rotation procedures
Monitor key usage and compliance
CI/CD Integration
Pipeline Integration
Integrate key management with deployment pipelines
Automate key distribution to new VMs
Implement automated testing of key functionality
Monitor and alert on key-related issues
Previous
"Importing SSH Keys"
Next
"Attaching Firewalls to VMs"
Built with