diff --git a/configuration.json.example b/configuration.json.example index 5354d1f..3f079b2 100644 --- a/configuration.json.example +++ b/configuration.json.example @@ -5,6 +5,7 @@ "backupDestinationBasePath": "tank", "backupConfigurationDestinationPath": "tank/configs", "backupDestinationPrivateKeyPath": "/opt/backup_id_rsa", + "disableHostKeyChecking":true, "transferStrategy":"mbuffer", "snapshotIdentifier":"smartcopy", "mBufferLocalPath":"/opt/smartcopy/bin/mbuffer", diff --git a/lib/endpoint.js b/lib/endpoint.js index 29beea4..5eef573 100644 --- a/lib/endpoint.js +++ b/lib/endpoint.js @@ -20,6 +20,14 @@ Endpoint.prototype.sshCmd = function(){ cmdParts.push('-i'); cmdParts.push(this.privateKeyPath); } + if ( config.disableHostKeyChecking === true){ + cmdParts.push( + '-o', + 'UserKnownHostsFile=/dev/null', + '-o', + 'StrictHostKeyChecking=no' + ); + } var destination = ''; if ( this.username != null ){ destination += this.username + "@";