Rsync via ssh and Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory

You can easily use rsync encrypted in a ssh session, with:

rsync -avP -e "ssh -i /home/user/.ssh/id_rsa" remoteuser@remoteserver.com:~/directory/to/sync .

Use the complete path of the ssh key, if you put ~/.ssh/id_rsa you’ll have this error by rsync:

Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory

2 thoughts on “Rsync via ssh and Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.