Skip to content

Commit

Permalink
added key disableHostKeyChecking that if set to true will cause smart…
Browse files Browse the repository at this point in the history
…copy to bypass the built-in SSH host key checks. This is useful if you dont want to worry about the known host file across reboots. If this key doesnt exist or is false, it is the admins responsibility to ensure the known hosts file is up to date
  • Loading branch information
davefinster committed Sep 28, 2015
1 parent 664c11c commit a8d1620
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions configuration.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions lib/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "@";
Expand Down

0 comments on commit a8d1620

Please sign in to comment.