-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for pure dart interactive shell #604
Conversation
- added startUserSession method to InitialTunnelHandler - renamed *InitialTunnelHandler to *SshSessionHandler - added userKeyPairIdentifier to SshnpCore constructor - substantial refactoring of SshnpDartSshSessionHandler to enable code reuse when implementing startUserSession - added `bool get canRunShell` and `Future<SshnpRemoteProcess> runShell()` to Sshnp and all subclasses TODOS: - Implement startUserSession in SshnpDartSshSessionHandler - Hook something up to stdin, stdout and stderr of the SshnpRemoteProcess - Test test test test test - Refactor until everything is tidy Other - fixed a few typos - ran dart format
This reverts commit f95628f.
…anth/pure-dart-interactive-ssh
' to localhost:${params.remoteSshdPort} on remote side'); | ||
|
||
await helper.startForwarding( | ||
fLocalPort: localPort, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will have to rethink how we do this later, ideally we can control whether we forward the sshd port to a physical socket, or forward it via Dart Streams to the user session.
The first is preferred on Desktop, but not possible on mobile, so we will need the option of falling back to the second somehow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current behaviour is fine for the current release though, it shouldn't cause any breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's an implementation detail within the PureDartImpl so should be fine to change; my objective for 4.0.0 is to get the pure dart CLI working in such a way that we can follow with 4.1.0 which works in mobile
…-interactive-ssh feat: pure dart interactive ssh -> gkc
- Added identityKeyPair as mandatory constructor parameter for SshnpDartPureImpl in order to fix bug where public key wasn't being sent to remote daemon because identityKeyPair wasn't set - Added `done` future to SshnpRemoteProcess so program can listen on it - Made various logging changes, objective being to ensure that with --verbose, there is a reasonably complete log of what is happening. Previously, sshnpdchannel and sshrvdchannel were not honouring the --verbose
@XavierChanth I think we need to make wdyt? |
openssh has a list of fallback keys, hence why I didn't enforce it: from the man pages:
|
Ack 👍 |
- What we did
feat: Add support for pure dart interactive shell
- How I did it
Feature
bool get canRunShell
andFuture<SshnpRemoteProcess> runShell()
to Sshnp and all subclasses and implemented for the SshnpDartPureImplrunShell
ifcanRunShell
is true, and hook up stdio to the remote shellOther
- How to verify it
Manually test - e.g.