sftp and cronjob
I want transfer file daily to remote machine daily using cronjob.
This can achieved via ftp (with the code below) but my concern is on the security site. Anyone can sniff and get my username and password of my ftp server.
After doing some research I found out that I need use rsync over ssh/sftp to achive via a secure tunnel.
To my understanding I need create public key and copy this over to the other server so that when ssh it will not prompt for password.
Is this approach secure? Can another machine masquerade as the trusted host?
# current ftp cron job with cleartext password which is unsecure
ftp -inv <<!
user ganesh 123456