MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / validatePort

Function validatePort

ssh/ssh.ts:51–57  ·  view source on GitHub ↗
(port: string)

Source from the content-addressed store, hash-verified

49 return;
50 } catch {
51 throw error;
52 }
53 }
54}
55
56async function isSshServiceActive(): Promise<boolean> {
57 for (const serviceName of ["sshd", "ssh"]) {
58 try {
59 await execFileAsync("systemctl", ["is-active", "--quiet", serviceName]);
60 return true;

Callers 3

changeSSHPortMethod · 0.85
openPortMethod · 0.85
closePortMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected