I’m trying to create a script that would run from a VM and on a change of files in a remote folder would rsync the changed or new files from there to a local user’s machine
There is a ssh key pair and ssh connection with the remote machine
One thing I can’t figure out is a way to run the rsync command in such a way that it uses the ssh key file for the connection without putting in the local machine’s ip address.
(A secondary thing is setting it up so that it runs the rsync on a change in the files).
Could anyone write a command to do that?