I am a developer currently working on the RUT200. Since we plan to have many such modems in the future, we would like to centralize our logs. To to so, I would like to use curl to upload log files to an SFTP server.
However, when I try and do so on an up-to-date RUT200, I get an error :
$ curl --user user:pass --upload-file filename.txt “sftp://10.X.X.X/”
curl: (1) Protocol “sftp” not supported or disabled in libcurl
It would appear that currently sftp in not among the supported protocols for the curl command on RUT200.
Do you think this functionality could be added in the future ?
Currently, the sftp is not supported for the curl command on Teltonika devices.
I understand that you would like to centralize logs. Are those logs only from RUT200, or has some custom solution been developed that also stores logs?
You could install SSHFS to access remote directories over SFTP from RUT200. To do this, please go to System > Package Manager and install SSHFS. After installing SSHFS, you can mount the remote drive and redirect logs to the file on that drive.
Alternatively, you can use syslog, which is already integrated into Teltonika devices. To enable syslog, go to System > Maintenance > Troubleshoot in the device settings. For custom applications, configure them to send logs to the logread command, and the logs will be automatically transmitted to your server.
There is also a possibility to copy files using scp. For example, you can use scp root@192.168.1.1:\\path\to\file\on\router C:\Path\to\your\computer