Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions server/app/core/sshManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,5 @@ module.exports = {
getSshHostinfo,
removeSsh,
askPassword,
createSsh,
isVerboseSshEnabled
createSsh
};
2 changes: 1 addition & 1 deletion server/app/db/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "2026-0605-221627" }
{"version": "2026-0605-211714" }
13 changes: 2 additions & 11 deletions server/app/handlers/tryToConnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ const SshClientWrapper = require("ssh-client-wrapper");
const { getLogger } = require("../logSettings");
const logger = getLogger();
const { remoteHost } = require("../db/db");
const { askPassword, isVerboseSshEnabled } = require("../core/sshManager.js");
const { askPassword } = require("../core/sshManager.js");

/**
* try to connect remote host via ssh
* @param {string} clientID - socketIO client's ID string
* @param {object} hostInfo - target host's information
* @param {Function} cb - call back function called with string "success" or "error"
* @returns {Promise<void>}
*/
async function onTryToConnect(clientID, hostInfo, cb) {
hostInfo.password = askPassword.bind(null, clientID, hostInfo.name, "password", null);
hostInfo.passphrase = askPassword.bind(null, clientID, hostInfo.name, "passphrase", null);
if (isVerboseSshEnabled()) {
if (process.env.WHEEL_VERBOSE_SSH) {
hostInfo.sshOpt = ["-vvv"];
}
const ssh = new SshClientWrapper(hostInfo);
Expand All @@ -39,14 +38,6 @@ async function onTryToConnect(clientID, hostInfo, cb) {
ssh.disconnect();
return cb("success");
}

/**
* try to connect remote host via ssh with host id
* @param {string} clientID - socketIO client's ID string
* @param {string} id - remote host id
* @param {Function} cb - call back function called with string "success" or "error"
* @returns {Promise<void>}
*/
async function onTryToConnectById(clientID, id, cb) {
const hostInfo = remoteHost.get(id);
await onTryToConnect(clientID, hostInfo, cb);
Expand Down
108 changes: 0 additions & 108 deletions server/test/app/handlers/tryToConnect.js

This file was deleted.

Loading