if i start from console /root/start.sh all works fine it sends file to remote host
but if i add to init.d and rc.d i see that start.sh started then scp.sh started but it stacking on
sshpass -e scp /tmp/rmm_nr_own_report
i dont even know how to check because when i start start.sh from console it works
no i cant
the size of it 1.34Mb and i use 8 Mb flash routers
but it is really triki why doesnt it works when i started it via script which started by system in background
i know there is way to try with preshared keys but why sshpass dont work when it started by system
Thanks guys for your help. I came to solution! First, I executed from rc.local "yes | ssh...." and looked what changed. Ssh created /.ssh/known_hosts on the device (yeah, indeed in the / folder). For
Host '192.168.222.1' is not in the trusted hosts file.
(ssh-ed25519 fingerprint SHA256:FpB893tBVdJRX63XR4vBS4yOLqAEdgN31Rhs2zm25wM)
Do you want to continue connecting? (y/n)
but where do i put that confirmation if i use scp and sshpass and sshpass does not have yes option
dropbearkey -h
Usage: dropbearkey -t <type> -f <filename> [-s bits]
-t type Type of key to generate. One of:
rsa
ed25519
-f filename Use filename for the secret key.
~/.ssh/id_dropbear is recommended for client keys.
-s bits Key size in bits, should be a multiple of 8 (optional)
Ed25519 has a fixed size of 256 bits
-y Just print the publickey and fingerprint for the
private key in <filename>.