Establishing a FTP connection to the root directory

Hey there,
since I’m getting an hourly email that my storage space is going to be exceeded very soon (I’m at 94% usage) I want to move some files, mainly old call recordings, from the Server to my PC for archiving.
How do I establish a connection to the directory? I haven’t been able to connect to anything but the configuration directory (/tftboot) since I’ve purchased the SysAdmin Pro Module.

Use WinSCP (in sftp mode with your normal ssh login).

You can also use psftp (part of putty, which you probably already have), but it doesn’t do recursion so you only download one day’s recordings with a single command.

The server refuses SFTP, but listens to FTP.
That’s the message I get.
And with FTP it says access denied.

Are you passing a firewall?

Nope, I’m on my LAN. Only Firewall active (at least it should be this way) on this route is FreePBX itself.

I use sftp every day on distro systems on default port 22.

Same here. Which client are you using? And what distro version are you on?

Version 14.0.5.25, im using WinSCP since it has been recommended by others using FreePBX.

Perhaps your IP is banned from connecting? Check intrusion detection

No banned IPs, local subnet is on the whitelist.

What method or program are you using for the sftp connection? Does it give you an opportunity to enter a password?

NVM I see you are using winscp

Can you connect to a shell prompt on the PBX with putty? If not, fix that first or post what goes wrong.

Confirm that your putty login requires nothing more than double-clicking the session name (and typing a password if required). If not, add whatever was missing (default user, RSA key, etc.) to the putty session and save it.

At the WinSCP login window, click Tools -> Import Sites and re-import the putty session for FreePBX.

If the putty login requires sudo to access the files you want to save, either fix that or see https://winscp.net/eng/docs/faq_su .

You should now have no trouble saving with WinSCP.

I’m not familiar with putty, I’m mostly using Termius. I’ve been able to connect via FTP using the credentials I’ve configured under “Provisioning Protocols” in the System Admin Panel, but then again I’m only getting to /tftboot and not to the call recordings.

You need to use sftp rather than ftp and your normal cli credentials

I know this is not a direct response to your question, but I use the webmin interface, and under “other” there is an Upload and Download function. I download from there to save older call recordings, which automatically compresses them into a single file, and downloads them to a local backup drive. I do this monthly, and then use the File Manager to simply delete them from the server.

I actually resolved the problem and it’s kinda embarrassing. I just used the wrong port. For some reason, sftp and ssh were on Port 23, not 22. After selecting the correct port I was able to connect without any problems and get my data.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.