I am manually carrying out a series of files which involves generating files on my local machine and then copying them over to a remote machine.
Currently, I use scp and ssh to perform these tasks. At the moment, eash time I want to ssh into the remote machine, or do a scp, I am (quite rightly), prompted for a password. However, I want to automate the tasks into one script that I can setup to run with cron.
I have seen insecure solutions to this problem, which involve setting the PASSWORD in an environment variable. I am not comfortable with that. Can someone suggest another, more secure way of automating a script that uses ssh and scp?.
BTW, both my local machine and remote machine are running Linux (Ubuntu)