mscdex / mscdex/ssh2

How to correctly end client connection / block client ?

Open
#916 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
5.8k
Forks
734
PR merge metrics
No merged PRs in 30d

Description

Say the client fails to log in 3 times in a row and I want to block his IP.
What's the correct way to do this and send the client a message that he did too many login attempts?

I tried calling client.end() in the connection event. It ends the connection but I also get Error: Bad identification start after that.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the server's connection event and the client.end() call described in the issue; reproduce three failed logins and observe the Bad identification start error. Determine the supported way to reject or block the client while sending an explanatory message, then document or test the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.