Vishnu Rao
Regular Contributor
I have a USB connected hard drive which serves as the dumping ground for pictures & videos captured on all phones in the home. The phones back up to the SMB location via an app.
The pics & vids are reviewed once a week and then rsynced over ssh to a larger NAS. My goal is to automate this via a script cronned to run once week.
I have the script ready, but the challenge is that the router does not save the ssh credentials. It asks me if I trust the host and then enter password everytime I run the script.
As shown below it first asks me if i trust the host.
dmin@RT-AC1900P-4900:/jffs/scripts# sh my_rsync.sh
Host '192.168.1.4' is not in the trusted hosts file.
(ssh-ed25519 fingerprint sha1!! 1e:43:16:bc:5c:30:71:04:1b:32:c9:b7:1d:64:1f:b9:36:e1:3d:a7)
Do you want to continue connecting? (y/n) y
1. How do I add the host to the trusted hots file? I think this gets deleted everytime I reboot the router.
2. How do I save ssh credentials and preserve them from being erased at reboot?
The pics & vids are reviewed once a week and then rsynced over ssh to a larger NAS. My goal is to automate this via a script cronned to run once week.
I have the script ready, but the challenge is that the router does not save the ssh credentials. It asks me if I trust the host and then enter password everytime I run the script.
As shown below it first asks me if i trust the host.
dmin@RT-AC1900P-4900:/jffs/scripts# sh my_rsync.sh
Host '192.168.1.4' is not in the trusted hosts file.
(ssh-ed25519 fingerprint sha1!! 1e:43:16:bc:5c:30:71:04:1b:32:c9:b7:1d:64:1f:b9:36:e1:3d:a7)
Do you want to continue connecting? (y/n) y
1. How do I add the host to the trusted hots file? I think this gets deleted everytime I reboot the router.
2. How do I save ssh credentials and preserve them from being erased at reboot?