0
I'm trying to automate a backup process using duplicity initiated by a bash script.
The data is to be tranferred via SFTP. To automate the authentication, I have set up keys using ssh-keygen -t rsa
and transferred the public key to the server. Establishing a SSH connection the regular way works without problems.
I have this line starting duplicity to transfer the data:
env PASSPHRASE=$(cat pass.txt) duplicity $target_dir sftp://$USER@$bak_server/$store_location
. The constants being the paths and addresses.
And it works fine on any GNU/Linux but doing this on Mac leads me to these frustrating debug messages:
Backend error detail: Traceback (innermost last):
File "/usr/local/bin/duplicity", line 1560, in <module>
with_tempdir(main)
File "/usr/local/bin/duplicity", line 1546, in with_tempdir
fn()
File "/usr/local/bin/duplicity", line 1385, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/local/Cellar/duplicity/0.7.18.2/libexec/lib/python2.7/site-packages/duplicity/commandline.py", line 1135, in ProcessCommandLine
backup, local_pathname = set_backend(args[0], args[1])
File "/usr/local/Cellar/duplicity/0.7.18.2/libexec/lib/python2.7/site-packages/duplicity/commandline.py", line 1010, in set_backend
globals.backend = backend.get_backend(bend)
File "/usr/local/Cellar/duplicity/0.7.18.2/libexec/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
obj = get_backend_object(url_string)
File "/usr/local/Cellar/duplicity/0.7.18.2/libexec/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
return factory(pu)
File "/usr/local/Cellar/duplicity/0.7.18.2/libexec/lib/python2.7/site-packages/duplicity/backends/ssh_paramiko_backend.py", line 235, in __init__
self.config['port'], e))
BackendException: ssh connection to user@IPv4:22 failed: not a valid RSA private key file
The duplicity version on the server and on my Mac are the same. Trying this with my server as client to another server also works fine.
Is there a known cause/workaround/solution for this? :/