Skip to content

Commit ed86e78

Browse files
wraggebasnijholt
andauthored
Add space to SSH command to fix error when using -i option (#46)
* Add space to SSH command to fix error when using -i option Using the `-i` option to supply a SSH key fails with the error 'Safety check failed - the destination does not appear to be a backup folder or drive (marker file not found).' This seems to be because of a missing space in the SSH parsing code which means that the key address and the SSH address get munged together. This pull request simply adds a space between them. * add space elsewhere to make test pass * oops --------- Co-authored-by: Bas Nijholt <[email protected]>
1 parent 248de06 commit ed86e78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rsync_time_machine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ def parse_ssh(
220220
ssh_user = ssh["user"] if ssh["user"] else ""
221221
ssh_host = ssh["host"]
222222
auth = f"{ssh_user}@{ssh_host}" if ssh_user else ssh_host
223-
ssh_cmd = f"ssh -p {ssh_port} {'-i ' + id_rsa if id_rsa else ''}{auth}"
223+
id_rsa_opt = f"-i {id_rsa} " if id_rsa else ""
224+
ssh_cmd = f"ssh -p {ssh_port} {id_rsa_opt}{auth}"
224225

225226
ssh_src_folder_prefix = f"{auth}:" if ssh_src else ""
226227
ssh_dest_folder_prefix = f"{auth}:" if ssh_dest else ""

0 commit comments

Comments
 (0)