I have created 2 servers, new to ssh sshpass s1 ip 192.168.1.245 s2 ip 192.168.1.76 wanted to copy files in s1>>/opt/files to s2>>/home/s2/backup
objective: put 1 sentence in cron to do auto rsync
i have these method
1) using ssh rsa key method, genkey and copy over the key it works for direct access. doesnt meet my need for rsync files perhaps i did wrong or missing steps or issue wrong commands
2) tried SSHPASS can store pass but still doesnt work
3) SSH + SSHPASS getting all kinds of error
The above 3 methods are google using SSH without password and SSHPASS without password
Any expert could provide me with one line command or suggestion?