Fixed SSH2 dependency on NodeJS v11

Ylian Saint-Hilaire committed Jun 8, 2021 at 12:19 UTC 5d1472e5acd7ebc5b5c3cd4d292b3cc16b1abd54
1 file changed +2 -2
meshcentral.js
+2 -2
@@ -3153,7 +3153,7 @@ function mainStart() {
3153 if (config.domains[i].yubikey != null) { yubikey = true; }
3154 if (config.domains[i].auth == 'ldap') { ldap = true; }
3155 if (config.domains[i].mstsc === true) { mstsc = true; }
3156 - if (config.domains[i].ssh === true) { if (nodeVersion < 10.04) { config.domains[i].ssh = false; } ssh = true; }
3156 + if (config.domains[i].ssh === true) { if (nodeVersion < 11) { config.domains[i].ssh = false; } ssh = true; }
3157 if ((typeof config.domains[i].authstrategies == 'object')) {
3158 if (passport == null) { passport = ['passport']; }
3159 if ((typeof config.domains[i].authstrategies.twitter == 'object') && (typeof config.domains[i].authstrategies.twitter.clientid == 'string') && (typeof config.domains[i].authstrategies.twitter.clientsecret == 'string') && (passport.indexOf('passport-twitter') == -1)) { passport.push('passport-twitter'); }
@@ -3172,7 +3172,7 @@ function mainStart() {
3172 if (require('os').platform() == 'win32') { modules.push('node-windows'); modules.push('loadavg-windows'); if (sspi == true) { modules.push('node-sspi'); } } // Add Windows modules
3173 if (ldap == true) { modules.push('ldapauth-fork'); }
3174 if (mstsc == true) { modules.push('node-rdpjs-2'); }
3175 - if (ssh == true) { if (nodeVersion < 10.04) { addServerWarning('MeshCentral SSH support required NodeJS 10.4 or higher.'); } else { modules.push('ssh2'); } }
3175 + if (ssh == true) { if (nodeVersion < 11) { addServerWarning('MeshCentral SSH support required NodeJS 11 or higher.'); } else { modules.push('ssh2'); } }
3176 if (passport != null) { modules.push(...passport); }
3177 if (sessionRecording == true) { modules.push('image-size'); } // Need to get the remote desktop JPEG sizes to index the recodring file.
3178 if (config.letsencrypt != null) { modules.push('acme-client'); } // Add acme-client module