Sftp - cannot find file sftp'ed from mirkotik

tried to test pushing dhcp lease files from mikrotik router to Openwrt DumbAP's.
it says success on mikrotik side but cannot find the file in Openwrt target location.
must be something basic i must be missing. thanks.

/tmp location


root@APNew:/tmp# ls
0.db                           luci-indexcache.something.json
TZ                             overlay
board.json                     resolv.conf
collectd.conf                  resolv.conf.d
dhcp.leases                    rrd
dnsmasq.d                      run
etc                            shm
hosts                          spool
lib                            state
lock                           sysinfo
log                            tmp

Openwrt syslog
**

Wed Oct  9 00:17:54 2024 authpriv.info dropbear[26294]: Child connection from 10.10.8.1:51388
Wed Oct  9 00:17:54 2024 authpriv.notice dropbear[26294]: Password auth succeeded for 'root' from 10.10.8.1:51388
Wed Oct  9 00:17:54 2024 authpriv.info dropbear[26294]: Exit (root) from <10.10.8.1:51388>: Exited normally

Mikrotik


[xyz@LAN] > /tool fetch upload=yes url="sftp://10.10.8.19/tmp/leases.txt" user=root password=test src-path="leases.txt"    
    status: finished
  uploaded: 2KiB
     total: 2KiB
  duration: 1s

Can mikrotik upload to any linux windows or mikrotik?

theoretically yes. some times there could be packet size related issues from outside to mikrotik based on size.

Packet size is negotiated within ssh protocol, seriously try to upload a file somewhere else.

Specification of the source directory missing?
(the target URL specifies location there, but the src-path spec is just the filename qithout absolute path...)

have checked that. if i give an invalid source file/path it complains immediately. does not say finished uploading.

found solution here:
https://openwrt.org/docs/guide-user/services/nas/sftp.server
once i installed sftp server it worked without anything as additional configuration.
what was confusing is that the caller came back as success(and nothing in openwrt log about error) while openwrt threw an error about absence of sftp-server (checked manually with sftp root@openwrtdumbap to identify issue)

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