Setting up SFTP

Trying to copy our nightly backup someplace other than local storage. We have an SFTP server available but the backup fails with a very generic: “Could not connect to host: , port:22”.

I can login to the server from my computer so the credentials are good and we’re not blocking traffic at the firewall.

Where do I go to start troubleshooting? There’s not much in the forum archives re: SFTP.


You need to copy the asterisk user’s public key to the ‘authorized_keys’ file of the SSH account you are trying to use.

Thanks for replying! Unfortunately I have no idea what that means. :confused: Do you know any place I can find documentation for how to do that?

google should work.

SFTP runs over SSH, SSH needs a user and an authority to connect, that authority could be a password, which is by definition interactive (thus intrinsically insecure, ) or securely with a ‘public key’, which if kosher is recognized by the servers ‘private key’ without any interaction needed.

Asterisk backups generally run as the asterisk user, if you login as the asterisk user, when you can login without a password to the SFTP server, you should be good. You can however run the backup through fwconsole as any user with sufficient privilege if that helps.

When keys are working, ALWAYS disable ssh password logins for all users.

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