Bug Report: SFTP Remote Backup Fails on SFTP-only Destinations (Hetzner Storage Box, etc.)
Summary:
CyberPanel’s Remote Backup feature cannot add SFTP destinations when the remote server supports SFTP only (no SSH shell), such as Hetzner Storage Box and many shared hosting providers. The panel tries to run remote shell commands (mkdir
, chmod
, etc.), which are not permitted, resulting in “Channel closed” errors.
Steps to Reproduce:
- Go to Backups > Add SFTP Destination in CyberPanel.
- Enter credentials for a remote SFTP server (e.g. Hetzner Storage Box) that supports SFTP only and does not allow SSH shell access.
- Choose Password authentication (not SSH key).
- Click Test Connection or Add Destination.
Expected Result:
- CyberPanel should add the SFTP destination and allow remote backups using password authentication, with no attempt to run shell commands.
Actual Result:
- CyberPanel attempts to run shell commands like
mkdir -p .ssh
,chmod
, andcp
on the remote server. - Since the SFTP server does not allow shell access, each command fails with:
Error executing remote command mkdir -p .ssh. Error Channel closed.
SSH error: Channel closed. [sendKey] - SFTP destination is not added, or backup cannot proceed.
Environment:
- **CyberPanel Version: 2.4.2
- **OS:**AlmaLinux 9
- Remote SFTP Server: Hetzner Storage Box (
your-storagebox.de
) - Authentication: Password only
Notes:
- The same SFTP credentials work with
rclone
,sftp
, FileZilla, and other tools—no issues with file transfer. - Other panels (DirectAdmin, Plesk) have similar issues and offer a “pure SFTP mode” (no shell commands) for such storage.
- This bug affects all SFTP-only remote storage, not just Hetzner.
Suggested Solution:
- Add a “pure SFTP mode” to CyberPanel remote backup, which does not attempt to run shell commands on the remote and relies only on SFTP file operations, especially when password authentication is selected.
- Optionally, detect and warn users if shell commands cannot be executed, and fallback to password-based SFTP only.
Workaround:
- Use
rclone
or another external tool for remote SFTP backups until this is fixed.
Thank you for considering this improvement, it will help many users who need to back up to SFTP-only destinations!