Transferring file via rsync with ssh key

Hello.

I’m attemtping to use rsync to transfer files between a relay & the BP.
It’s a little more difficult to do when using ssh keys. The coincashew guide shows how to do so without ssh keys: CoinCashew

I know how to point to the key, but I keep getting an invalid format error on the key. I have tried creating new keys and using the same one I use to login to the server. Here’s the command:

rsync -auvz -e “ssh -p [port#] -i private-key-filesource destination

To download file from server

rsync -avze "ssh -p [port#] -i [private-key-file]" [username]@[ip address]:[path-to-file-on-server] [path-to-destination]

To upload file to server

rsync -avze "ssh -p [port#] -i [private-key-file]" [path-to-file] [username]@[ip-address]:[path-to-destination]