SFTP Backup - Chroot jail

Status
Not open for further replies.

SKDamon

Silver Partner
Advanced Certified
Joined
Aug 6, 2018
Messages
52
Reaction score
7
Hey everyone,

I'm in the process of migrating away from Google Drive backup to a self-hosted SFTP server.

That server is running Ubuntu 16.04 with the latest OpenSSH available for that distro. The 3CXs are all debian-based (3CX ISO installer).
I can't set up the SFTP backup location if a chroot jail on the server is enabled...

Without chroot on the server, the SFTP location can be added and works fine.
With chroot enabled, I can connect using WinSCP no problem. But the 3CX throws an error message that it can't connect to the server.
Why is that? I see in /var/log/auth.log on the SFTP server that the 3CX correctly authenticates with the server. The SSH daemon log shows no errors (standard verbosity).

Server's sshd_config (only the chroot part):
Code:
Match User sk3cxbak
#    ChrootDirectory %h
    X11Forwarding no
    AllowTcpForwarding no
    ForceCommand internal-sftp

Connection URL in 3CX:
sftp://myserver.tld:1234/home/sk3cxbak/backups/mycustomer

Are there any logs on the PBX that would help identify the problem?
 
Status
Not open for further replies.