RemoteShell SSH-like experience over PKI#10123
Open
jp-bennett wants to merge 28 commits intodevelopfrom
Open
Conversation
|
Can there be a 2fa in some snazzy way |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new “DMShell” transport/protocol for Portduino to support remote PTY shell sessions over Meshtastic, plus a standalone Python client for exercising the feature via TCP API or USB serial.
Changes:
- Introduces new
DMShellprotobuf message/opcodes and port number, and binds generated nanopb descriptors. - Adds a Portduino-only
DMShellModuleimplementing a PTY-backed session with basic sequencing/ACK/replay. - Adds serializer/unit tests for DMShell protobuf frames and a standalone
bin/dmshell_client.pyclient.
Reviewed changes
Copilot reviewed 6 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| test/test_meshpacket_serializer/test_serializer.cpp | Registers new DMShell serializer tests with Unity. |
| test/test_meshpacket_serializer/ports/test_dmshell.cpp | Adds roundtrip serialization tests for DMShell frames. |
| src/modules/Modules.cpp | Instantiates DMShellModule on Portduino builds. |
| src/modules/DMShell.h | Declares DMShell session/frame state and module interface (Portduino-only). |
| src/modules/DMShell.cpp | Implements PTY session handling, sequencing/ACK/replay, and authorization checks. |
| src/mesh/generated/meshtastic/portnums.pb.h | Adds DM_SHELL_APP port number (comment currently incorrect). |
| src/mesh/generated/meshtastic/mesh.pb.h | Adds generated DMShell message and opcode enum definitions. |
| src/mesh/generated/meshtastic/mesh.pb.cpp | Binds nanopb descriptor for meshtastic_DMShell. |
| src/mesh/RadioLibInterface.h | Adds packetsInTxQueue() helper used for throttling DMShell output. |
| bin/dmshell_client.py | New standalone client (TCP API + serial) with session/replay/heartbeat logic. |
Collaborator
Author
We might be able to go to a system login instead of a shell. Then the Meshtastic node is the 2fa, and you're prompted for password. |
Collaborator
Author
|
@thebentern decent cleanup punchlist from copilot. I have a few other todo items to knock out before it's ready to merge. |
jamesarich
added a commit
to meshtastic/Meshtastic-Android
that referenced
this pull request
Apr 15, 2026
Align with firmware refactor (meshtastic/firmware#10123) and protobufs PR meshtastic/protobufs#894 which adds last_tx_seq and last_rx_seq fields to the RemoteShell message. - ACK: use last_rx_seq proto field instead of encoding replay-from seq into payload bytes - PING: use last_tx_seq/last_rx_seq proto fields instead of encoding heartbeat status as 8-byte payload - PONG: read last_tx_seq/last_rx_seq from proto fields instead of decoding payload - SentFrame: store flags/lastTxSeq/lastRxSeq for faithful replay - Remove unused encodeUint32BE, encodeHeartbeatStatus, decodeHeartbeatStatus helpers and associated constants Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jamesarich
added a commit
to meshtastic/Meshtastic-Android
that referenced
this pull request
Apr 15, 2026
Align with firmware refactor (meshtastic/firmware#10123) and protobufs PR meshtastic/protobufs#894 which adds last_tx_seq and last_rx_seq fields to the RemoteShell message. - ACK: use last_rx_seq proto field instead of encoding replay-from seq into payload bytes - PING: use last_tx_seq/last_rx_seq proto fields instead of encoding heartbeat status as 8-byte payload - PONG: read last_tx_seq/last_rx_seq from proto fields instead of decoding payload - SentFrame: store flags/lastTxSeq/lastRxSeq for faithful replay - Remove unused encodeUint32BE, encodeHeartbeatStatus, decodeHeartbeatStatus helpers and associated constants Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jamesarich
added a commit
to meshtastic/Meshtastic-Android
that referenced
this pull request
Apr 15, 2026
Align with firmware refactor (meshtastic/firmware#10123) and protobufs PR meshtastic/protobufs#894 which adds last_tx_seq and last_rx_seq fields to the RemoteShell message. - ACK: use last_rx_seq proto field instead of encoding replay-from seq into payload bytes - PING: use last_tx_seq/last_rx_seq proto fields instead of encoding heartbeat status as 8-byte payload - PONG: read last_tx_seq/last_rx_seq from proto fields instead of decoding payload - SentFrame: store flags/lastTxSeq/lastRxSeq for faithful replay - Remove unused encodeUint32BE, encodeHeartbeatStatus, decodeHeartbeatStatus helpers and associated constants Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: jp-bennett <5630967+jp-bennett@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Still WIP, but actually working, and ready for some general sanity checks from others. does not work super well with a ch341 device, but you can use any Meshtastic device as the local node, and connect using the client script over USB, to connect to a remote Linux node.
LLM was heavily used to generate this. I feel like I kept it reigned on reasonable well in the c++ code (though I'm sure I'll make changes there before I'll completely happy). I'm much less certain about the Python code. Ideally this function can land in the Meshtastic python CLI, but for now, the standalone client is super useful for testing.