Page 1 of 1

[SOLVED]SSH/SCP to copy files away from router.

Posted: Mon Oct 30, 2017 8:48 am
by BatterBits
I want to take regular backups and copy the files off the router to my NAS, using a cron job.

What do I need to do to enable this functionality? I can scp from a the NAS, and "collect" the files, but I want to run the job from the router, not from the NAS

The command I use, just hangs and eventually times out. I've tried with SSH - using this:

Code: Select all

*****@Gargoyle:/tmp/backup# ssh 192.168.1.210

ssh: Exited: Error connecting: Connection timed out
this works from a different host on the same LAN -

Code: Select all

*****@pine64:/tmp/backup$ ssh 192.168.1.210
*****@192.168.1.210's password:

Re: SSH/SCP to copy files away from router.

Posted: Mon Oct 30, 2017 9:51 pm
by ericwong
I think it is probably easier to run cron to backup your files to USB drive which is shared on your LAN. Then, you can run another command to copy the files from the shared USB drive to your NAS.

Re: SSH/SCP to copy files away from router.

Posted: Tue Oct 31, 2017 2:20 am
by BatterBits
Thanks Eric - inadvertently, you have prompted a resolution to the problem.

I tried to ssh from the router to another box, which succeeded - which in turn made me realise there was a problem on the NAS - it turns out that the router ip address had been but on the NAS's ban list permanently! Having resolved that, I can now scp to the NAS as I had wanted to do.

Re: SSH/SCP to copy files away from router.

Posted: Tue Oct 31, 2017 2:40 am
by ericwong
BatterBits wrote:it turns out that the router ip address had been but on the NAS's ban list permanently!
Since you didn't add the IP address to the ban list yourself, I have a feeling this setting could be related to security. Just make sure you aren't creating a security hole yourself by exposing your NAS to the internet via your router ;)