mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add warning when using keyboard interactive
This commit is contained in:
@@ -24,7 +24,8 @@ export const execAsyncRemote = async (
|
|||||||
conn
|
conn
|
||||||
.once("ready", () => {
|
.once("ready", () => {
|
||||||
console.log("Client :: ready");
|
console.log("Client :: ready");
|
||||||
conn.exec(command, (err, stream) => {
|
conn
|
||||||
|
.exec(command, (err, stream) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
stream
|
stream
|
||||||
.on("close", (code: number, signal: string) => {
|
.on("close", (code: number, signal: string) => {
|
||||||
@@ -48,6 +49,15 @@ export const execAsyncRemote = async (
|
|||||||
.stderr.on("data", (data) => {
|
.stderr.on("data", (data) => {
|
||||||
stderr += data.toString();
|
stderr += data.toString();
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.on("keyboard-interactive", () => {
|
||||||
|
console.log("Warning: Keyboard interactive, closing connection");
|
||||||
|
conn.end();
|
||||||
|
reject(
|
||||||
|
new Error(
|
||||||
|
"Password requested. Invalid SSH key or authentication issue.",
|
||||||
|
),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.connect({
|
.connect({
|
||||||
|
|||||||
Reference in New Issue
Block a user