File permission for pem file
chmod 400 {keyfile}.pem
Back with tar and today's date:
tar -zcvf "htdocs$(date '+%Y-%m-%d').tar.gz" htdocs
Rsync example \n
rsync -av — progress -e “ssh -i /home/mn/Documents/AWS/LightsailDefaultKey-us-east-1.pem” /home/mn/wordpress-5.4-0/apps/wordpress/htdocs/wp-content/themes/porto [email protected]:/home/bitnami/apps/wordpress/htdocs/wp-content/themes/
ssh: ssh -i /path/my-key-pair.pem [email protected]