Platform Login

« back to blog overview

Secure SSH Access at Scale: Managing Linux Devices with qbee-cli and SSH Key Distribution

ssh tunneling

In the world of IoT and edge computing, secure device access is paramount. While SSH has long been the gold standard for secure remote access, managing SSH keys across a fleet of devices can be challenging. Today, we’ll explore how qbee.io’s SSH key distribution automation combined with qbee-cli creates a powerful solution for secure, scalable device management.

The Challenge of SSH Key Management at Scale

Traditional SSH key management faces several challenges:

  • Manual distribution of keys across devices
  • Keeping track of which keys are deployed where
  • Secure key rotation
  • Ensuring consistent access across the fleet
  • Managing multiple users and their access rights

 

qbee.io solves these challenges through automated SSH key distribution and qbee-cli’s secure tunneling capabilities.

Setting Up Your SSH Infrastructure

Step 1: Generate Secure SSH Keys

Let’s start by creating a strong SSH key using current best practices:

ssh-keygen -t ecdsa -b 521

💡 Pro Tip: ECDSA keys with 521 bits provide excellent security while maintaining good performance.

Follow the prompts and leave the passphrase empty.

 

For MacOS users:

Important: Newer MacOS versions require manual addition of the key to the keychain for persistence across reboots.

Step 2: Distribute SSH Keys via qbee.io

qbee.io makes key distribution effortless:

  1. Navigate to the SSH Keys tab in the qbee.io dashboard
  2. Select the target user (must exist on the devices)
  3. Add your public key (from ~/.ssh/id_ecdsa.pub)
  4. Apply the configuration to your device fleet

⚠️ Important: Adding new keys overwrites existing ones, so ensure you include all necessary keys in your configuration.

Step 3: Configure qbee-cli SSH Integration

This step is for remotely accessing the devices from your terminal. The qbee UI provides a simple means of getting ssh access directly from the UI as described here.
For seamless access directly from your machine set up your SSH config:

Linux/MacOS (~/.ssh/config):

Host qbee-cli+*
ProxyCommand qbee-cli connect -d $(echo %h | sed 's/qbee-cli+//') -t stdio:localhost:22

Windows (~/.ssh/config):

Host qbee-cli+*
ProxyCommand powershell.exe -Command ".\qbee-cli.exe connect -d (echo %h).Replace('qbee-cli+','') -t stdio:localhost:22"

Using the Integration

Basic SSH Access

Connect to any device in your fleet:

ssh user@qbee-cli+<device-id>

Secure File Transfer

Copy files securely:

scp -r local_folder user@qbee-cli+<device-id>:/remote/path

Remote Command Execution

Run commands across your fleet:

ssh user@qbee-cli+<device-id> 'uptime'

Best Practices for SSH Management

1. Key Organization

  • Use meaningful key names
  • Document key ownership
  • Maintain an inventory of deployed keys – done by qbee
  • Use separate keys for different purposes/environments

2. Security Considerations

  • Regularly rotate SSH keys – very easy to do with qbee
  • Use strong key types (ECDSA-521)
  • Implement proper access controls – done by qbee
  • Monitor SSH access patterns – done by qbee

3. Automation Strategies

  • Script key rotation procedures – can be initiated manually or through API and will be documented
  • Automate access audits – done by qbee
  • Create deployment verification checks – done by qbee
  • Implement emergency access procedures – done by qbee

Troubleshooting Common Issues

1. Connection Problems

  • Verify qbee-cli authentication
  • Check SSH key permissions
  • Ensure target user exists on the device
  • Verify SSH service is running

2. Key Distribution Issues

  • Confirm key format is correct
  • Check user permissions on target devices
  • Verify qbee.io configuration deployment
  • Monitor deployment status

Business Benefits

1. Reduced Operational Costs

  • Automated key management
  • Simplified access procedures
  • Reduced manual intervention
  • Streamlined troubleshooting

2. Enhanced Security

  • Centralized access control
  • Automated key rotation
  • Audit trail capabilities
  • Secure by default

3. Improved Scalability

  • Manage thousands of devices
  • Consistent access patterns
  • Automated deployment
  • Reduced human error

Conclusion

The combination of qbee.io’s SSH key distribution automation and qbee-cli creates a powerful, secure, and scalable solution for managing Linux device fleets. By automating key management and providing secure tunneling capabilities, organizations can focus on their core operations while maintaining enterprise-grade security.

Whether you’re managing a small cluster of edge devices or a global fleet of thousands, qbee.io’s integrated approach to SSH management ensures secure, efficient, and scalable access to your entire infrastructure. We will soon also feature how to integrate Ansible.

Ready to modernize your SSH management? Sign up for qbee.io and download qbee-cli to experience the future of secure device access.


Want to learn more about secure device management? Check out our documentation or contact our support team.

Interested to know more?