mscdex / mscdex/ssh2

Map Server Session events to Client methods

Open
#942 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

My final goal is to be able to pipe a Session from a ssh2.Server Session to a ssh2.Client (once authenticated).
That way I can pipe to multiple Client for example.

For most of the Server Session events, it's easy to map them to a Client method.

However there are few requests that are sent internaly in during Client.shell() or Client.exec().
It's all the todo stack that can call reqAgentFwd, reqPty, reqX11 (same in the shell() method)

In the Server, these events (for example the ptyevent) are associated to a client Session and they can theoricaly be emitted multiple times I guess. But the Client cannot send them multiple time actualy.

Also does this mean that only one "real session start" requests should be received by Session ? But it seems the server can handle more than one per Session.

Thanks !

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 by comparing the Session events described in the v0.8.9 README with the request handling in lib/client.js, especially Client.shell(), Client.exec(), reqAgentFwd, reqPty, and reqX11. Then inspect the corresponding session handling near lib/server.js#L804. Done requires a clear, tested mapping of server Session events to Client methods and an answer for repeated session requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, networking
Issue type
Feature
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.