-
Notifications
You must be signed in to change notification settings - Fork 664
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
Getting ECONNRESET following example code. #1328
Comments
Is the SSH client disconnecting for some reason, causing this error? Try adding |
Thanks for taking your time
|
The client is attempting to start an interactive shell session, but your code is only set up to handle commands ( |
Ok i see. That could maybe have been commented on the Server section. But i digress. I'm not sure i actually need an interactive session though. I wish to create a jump server that holds the master ssh key. It would involve authenticating KeyA, opening a session to some node (based on the subdomain), and then connecting to that node with a KeyB. (the super secret key on the server). And then somehow connecting the 2 sessions. (and also not loosing support for ssh tunnels or sftp) Researched for 2 days. I'm starting to doubt whether this is even possible... sorry for asking questions like this when it's not really part of the issue at hand. |
The readme is already full of examples, I can't realistically showcase every single feature.
There is no support for automatic proxying of requests to an upstream server. You would need to explicitly add handlers for all types of client requests and then execute those requests using a new client and proxy them together in whichever way makes sense (e.g. calling the appropriate functions, piping streams together, etc.). |
thank you for your advice. |
just a note: putting this: session.on("shell", (accept, reject) => {
console.log("On shell");
var shell = accept();
}); right after: It doesn't do anything. But then server will no longer crash when i connect my usual ssh client. |
The OpenSSH client is probably exiting since by default I believe it requires a pty to be allocated, so you'd need to accept pty requests as well. |
So i open up the server as per the example code. I use my systems ssh client and attempt to connect.
and this is the output. I used
this is the entire code. only different is the change from require to import, add and port number, and typescript. Yes plain require+JavaScript produces to same behavior.
The exception happens on the server at
line 60 "const session = accept();"
My system configuration if you care
Windows 10 x64
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 (from gitforwindows)
Server and client is same machine.
The text was updated successfully, but these errors were encountered: