First step : setting a password-less SSH access (via ssh-keygen) :
Run ssh-keygen
(you end up with 2 files : id_rsa and id_rsa.pub, one is your .pub public key to share with the world, the other your private key).
Then run ssh-copy-id myUser@myServer
. Just type your password when prompted and you're now able to SSH without having to type your password for myUser@myServer.
Second step : automated daily scp :
Type crontab -e
, pick your favorite editor and add a line at the bottom of the file : 0 0 * * * scp -r myUser@myServer:/local/java/log/archive/2018/02/16/log.2018-02-16.gz ~/Temp/
save and... Voilà!
(you can use a @daily scp (...)
crontab entry, wich is basicaly the same as 0 0 * * *)
See Anacron (Job scheduling using crontab, what will happen when computer is shutdown during that time?) for managing Cron task when you computer is down.