Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
vincelwt committed Dec 24, 2024
1 parent 8181045 commit 3b01d5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,8 @@ const HOST_KEY_PATH = "./host.key";
// Modify the server startup code
const PORT = process.env.PORT ?? 2222;

console.log("Initializing server on port", PORT);

const server = new SSH2.Server(
{
hostKeys: [readFileSync(HOST_KEY_PATH)],
Expand All @@ -721,7 +723,7 @@ const server = new SSH2.Server(
},
},
async (client) => {
console.log("New client connection established");
console.log("Client connected");

const sessionId = `session_${++sessionCounter}`;
let autoLoginUsername: string | null = null;
Expand Down

0 comments on commit 3b01d5e

Please sign in to comment.