sets StrictHostKeyChecking to no

This commit is contained in:
samueleaton 2016-05-05 16:08:15 -06:00
parent 93f8ad0199
commit 9dcabb2408
2 changed files with 8 additions and 4 deletions

View file

@ -182,10 +182,12 @@ var AutoSSH = function (_EventEmitter) {
key: 'generateExecString',
value: function generateExecString() {
var bindAddress = this.localPort + ':localhost:' + this.remotePort;
var exitOnFailure = '-o "ExitOnForwardFailure yes"';
var exitOnFailure = '-o ExitOnForwardFailure=yes';
var serverAliveInterval = '-o ServerAliveInterval=' + this.serverAliveInterval;
var serverAliveCountMax = '-o ServerAliveCountMax=' + this.serverAliveCountMax;
var options = exitOnFailure + ' ' + serverAliveInterval + ' ' + serverAliveCountMax;
var serverAliveOpts = serverAliveInterval + ' ' + serverAliveCountMax;
var strictHostCheck = '-o StrictHostKeyChecking=no';
var options = exitOnFailure + ' ' + serverAliveOpts + ' ' + strictHostCheck;
var privateKey = this.privateKey ? '-i ' + this.privateKey : '';
var userAtHost = this.username + '@' + this.host;

View file

@ -150,10 +150,12 @@ class AutoSSH extends EventEmitter {
*/
generateExecString() {
const bindAddress = `${this.localPort}:localhost:${this.remotePort}`;
const exitOnFailure = '-o "ExitOnForwardFailure yes"';
const exitOnFailure = '-o ExitOnForwardFailure=yes';
const serverAliveInterval = `-o ServerAliveInterval=${this.serverAliveInterval}`;
const serverAliveCountMax = `-o ServerAliveCountMax=${this.serverAliveCountMax}`;
const options = `${exitOnFailure} ${serverAliveInterval} ${serverAliveCountMax}`;
const serverAliveOpts = `${serverAliveInterval} ${serverAliveCountMax}`;
const strictHostCheck = `-o StrictHostKeyChecking=no`;
const options = `${exitOnFailure} ${serverAliveOpts} ${strictHostCheck}`;
const privateKey = this.privateKey ? `-i ${this.privateKey}` : '';
const userAtHost = `${this.username}@${this.host}`;