Skip to content

fix: use cluster SSH key config and simplify BACKENDAI environment handling#15

Merged
inureyes merged 2 commits into
mainfrom
fix/ssh_key_user_name_match
Aug 27, 2025
Merged

fix: use cluster SSH key config and simplify BACKENDAI environment handling#15
inureyes merged 2 commits into
mainfrom
fix/ssh_key_user_name_match

Conversation

@inureyes
Copy link
Copy Markdown
Member

Summary

  • Fixed SSH key configuration to properly use cluster-specific SSH keys from config file
  • Simplified BACKENDAI environment variable handling by removing complex cluster matching logic
  • Changed auto-generated cluster name from 'backendai' to 'bai_auto' to avoid naming conflicts

Problem

  1. When using bssh -c <cluster>, the SSH key specified in cluster configuration was ignored
  2. BACKENDAI environment detection had unnecessarily complex logic for matching existing clusters
  3. Auto-generated cluster name 'backendai' could conflict with user-defined clusters

Solution

  1. SSH Key Resolution: Modified all command handlers to properly resolve SSH keys with priority:

    • CLI -i flag (highest priority)
    • Cluster-specific ssh_key from config
    • Default SSH key fallback
  2. BACKENDAI Simplification: Removed complex cluster matching logic. Now when BACKENDAI environment variables are detected:

    • Simply creates a 'bai_auto' cluster with default settings
    • Uses port 2200 and current username
    • Falls back to standard SSH key locations
  3. Naming: Changed auto-generated cluster name to 'bai_auto' to clearly indicate it's automatically generated and avoid conflicts

Test Results

  • bssh -c orin ls now correctly uses ~/.ssh/id_rsa_orin from config
  • ✅ BACKENDAI environment creates independent 'bai_auto' cluster
  • ✅ Path expansion (~) works correctly for SSH keys
  • ✅ Users can still create their own 'backendai' cluster without conflicts

@inureyes inureyes added the fix label Aug 27, 2025
@inureyes inureyes self-assigned this Aug 27, 2025
@inureyes inureyes merged commit 27eac24 into main Aug 27, 2025
3 checks passed
@inureyes inureyes added priority:medium Medium priority issue status:done Completed labels Sep 9, 2025
@inureyes inureyes added the type:bug Something isn't working label Oct 27, 2025
@inureyes inureyes deleted the fix/ssh_key_user_name_match branch October 30, 2025 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Medium priority issue status:done Completed type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant