diff --git a/plugins/00_dokku-standard/backup-import b/plugins/00_dokku-standard/backup-import index 076c0e930..86404a99b 100755 --- a/plugins/00_dokku-standard/backup-import +++ b/plugins/00_dokku-standard/backup-import @@ -6,8 +6,8 @@ TARGET_DIR="$3" [[ -f $IMPORT_DIR/.sshcommand ]] && mv $IMPORT_DIR/.sshcommand $TARGET_DIR/.sshcommand if [[ -f $IMPORT_DIR/.ssh/authorized_keys ]]; then - mkdir $TARGET_DIR/.ssh - mv $IMPORT_DIR/.ssh/authorized_keys $TARGET_DIR/.ssh/authorized_keys + mkdir -p $TARGET_DIR/.ssh + cat $IMPORT_DIR/.ssh/authorized_keys $TARGET_DIR/.ssh/authorized_keys | uniq > $TARGET_DIR/.ssh/authorized_keys chmod 0700 $TARGET_DIR/.ssh chmod 0600 $TARGET_DIR/.ssh/* fi