Skip to content

Commit f1ba14c

Browse files
author
FANG.Ge
committed
Add support for ssh algorithms, compaitibale with old embeded devices
1 parent 26d7d9f commit f1ba14c

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

package.json

+26
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,32 @@
288288
"bootstrap": {
289289
"type": "string",
290290
"description": "Content will be executed on the SSH host before the debugger call."
291+
},
292+
"algorithms": {
293+
"type": "object",
294+
"description": "This option allows you to explicitly override the default transport layer algorithms used for the connection.",
295+
"properties": {
296+
"cipher": {
297+
"type": "array",
298+
"description": "Ciphers."
299+
},
300+
"compress": {
301+
"type": "array",
302+
"description": "Compression algorithms."
303+
},
304+
"hmac": {
305+
"type": "array",
306+
"description": "(H)MAC algorithms."
307+
},
308+
"kex": {
309+
"type": "array",
310+
"description": "Key exchange algorithms."
311+
},
312+
"serverHostKey": {
313+
"type": "array",
314+
"description": "Server host key formats."
315+
}
316+
}
291317
}
292318
}
293319
}

src/backend/backend.ts

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface SSHArguments {
4747
x11host: string;
4848
bootstrap: string;
4949
sourceFileMap: { [index: string]: string };
50+
algorithms: any;
5051
}
5152

5253
export interface IBackend {

src/backend/mi2/mi2.ts

+4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ export class MI2 extends EventEmitter implements IBackend {
135135
connectionArgs.password = args.password;
136136
}
137137

138+
if (args.algorithms) {
139+
connectionArgs.algorithms = args.algorithms;
140+
}
141+
138142
this.sshConn.on("ready", () => {
139143
this.log("stdout", "Running " + this.application + " over ssh...");
140144
const execArgs: any = {};

0 commit comments

Comments
 (0)