In today’s interconnected world, managing a fleet of Linux devices remotely presents unique challenges. Whether you’re handling IoT deployments, edge computing devices, or distributed servers, secure access and efficient management are crucial. This is where qbee.io and its open-source command-line tool, qbee-cli, come into play, offering a seamless solution for secure remote device access and management.
Why qbee-cli?
Before diving into the technical details, let’s understand why qbee-cli is essential in the modern device management landscape:
- Security First: All connections are encrypted and secure by default
- Cross-Platform Support: Works seamlessly on Windows, Linux, and macOS
- Simple Integration: Easy to incorporate into existing scripts and automation workflows
- No VPN Required: Direct secure access to devices without complex network configurations
- Scalable: Designed to handle everything from single device management to large fleet operations
Installation and Setup
Getting started with qbee-cli is straightforward. Let’s walk through the process step by step.
Step 1: Download the Binary
Choose the appropriate method for your operating system:
Linux/MacOS:
curl -L -o qbee-cli https://github.com/qbee-io/qbee-cli/releases/latest/download/qbee-cli-<version>.[darwin|linux]-[amd64|arm64] chmod 755 qbee-cli
Windows:
curl -L -o qbee-cli.exe https://github.com/qbee-io/qbee-cli/releases/latest/download/qbee-cli-<version>.windows-amd64
💡 Pro Tip: Make sure to replace
<version>
with the latest release version from the GitHub releases page.
Step 2: Configure Authentication
qbee-cli uses environment variables for authentication. Set up your credentials:
Linux/MacOS:
export QBEE_EMAIL=<your-email@example.com>
export QBEE_PASSWORD=<your-password>
Windows:
set QBEE_EMAIL=<your-email@example.com>
set QBEE_PASSWORD=<your-password>
Two-Factor Authentication (2FA)
If your account uses 2FA, you have two options:
- Let qbee-cli prompt you for the 2FA provider selection
- Set the code directly for Google Authenticator:
export QBEE_2FA_CODE=<your-2fa-code>
First Connection: A Simple Test
Let’s verify everything is working by connecting to a device. You’ll need:
- Your device ID from the qbee.io web UI
- A service running on the device to connect to (e.g., SSH on port 22)
qbee-cli connect -d <device-id> -t 2222:localhost:22
This command:
- Creates a secure tunnel to your device
- Maps local port 2222 to port 22 on your remote device
- Allows you to SSH to your device using:
ssh -p 2222 user@localhost
Common Use Cases
1. Web Service Access
Access a web server running on your device:
qbee-cli connect -d <device-id> -t 8080:localhost:80
Now you can access the web server at http://localhost:8080
2. Multiple Port Forwarding
Connect to multiple services simultaneously:
qbee-cli connect -d <device-id> -t 8080:localhost:80,2222:localhost:22
3. SSH Integration
Set up permanent SSH access by configuring 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"
Then connect using:
ssh user@qbee-cli+<device-id>
Troubleshooting Tips
1. Connection Issues
If you’re having trouble connecting:
- Verify your credentials are correctly set
- Ensure the device ID is correct
- Check if the target port is actually running on the device
- Verify there are no local port conflicts
2. Authentication Problems
For authentication issues:
- Double-check your environment variables
- Ensure your 2FA code is current (if using 2FA)
- Verify your account status in the qbee.io web UI
3. Port Forwarding Errors
If port forwarding fails:
- Make sure the local port isn’t already in use
- Verify the remote service is running
- Check if your local firewall is blocking the connection
What's Next?
Now that you have qbee-cli set up and running, you can:
- Integrate it into your automation scripts
- Set up permanent SSH access configurations
- Create custom port forwarding profiles for different use cases
- Explore the qbee.io web interface for additional device management features
Conclusion
qbee-cli provides a secure, efficient way to manage remote Linux devices. Its simple installation process and straightforward usage make it an invaluable tool for modern device fleet management. Combined with qbee.io’s comprehensive device management platform, you have everything you need to handle your Linux device fleet securely and efficiently.
Whether you’re managing a handful of devices or thousands, qbee-cli’s approach to secure remote access eliminates the complexity traditionally associated with remote device management while maintaining enterprise-grade security.
Ready to get started? Sign up for a qbee.io account and download qbee-cli to begin managing your Linux device fleet more effectively today.
Need help or have questions? Visit our documentation or send us a mail.