I'm using rdiff-backup to send incremental backups to my local server. My host is Windows and my remote is a Linux machine. I'm trying to get my script to execute the following:
command = os.system('rdiff-backup --exclude "**.dropbox**" --exclude "**.ini**" --remote-schema "ssh -i C:/Users/Adam/.ssh/id_rsa %s -p1019 rdiff-backup --server" C:/Users/Adam/Dropbox email@example.com::/mnt/disk1/Adam/Dropbox')
However, during execution I'm promoted with:
Could not create directory '/home/Adam/.ssh'. The authentictity of host '[192.168.0.5]:1019 ([192.168.0.5]:1019)' can't be established. RSA key fingerprint is 2e:7c:f0:0c:4b:8d:fa:e1:21:a1:32:81:a0:e1:11:11. Are you sure you want to continue connecting (yes/no)?
I thought option
-i C:/Users/Adam/.ssh/id_rsa would over-ride this? It is not practical to have this requested per execution of the script. How can I bypass this, whilst maintaining authentication and security (as I will soon write a similar script for my laptop, but to send incremental backups via public and remote machines)?
Please read grawity's answer, along with the comments, to help yourself understand where I went wrong and how I fixed it - of course with grawity's help. In order to solve the issue with Cygwin saying
Cannot create directory /home/USERNAME/.ssh then see this blog post.
"First locate the file called
passwd in your
C:\path\to\cygwin\etc directory and open it with wordpad. Second, replace the text
/cygdrive/c/Documents and Settings/YOUR_NAME Finally, save the file."