Skip to content
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

Is this can connect ssh sever? #4

Open
wjhtinger opened this issue Feb 5, 2023 · 3 comments
Open

Is this can connect ssh sever? #4

wjhtinger opened this issue Feb 5, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@wjhtinger
Copy link

Suggestion / Feature Request

Just as a web ssh client.

@wjhtinger wjhtinger added the enhancement New feature or request label Feb 5, 2023
@MarketingPip
Copy link
Member

This can 100% do that! I was hoping to post a demo etc (but haven't stumbled upon a good library that exposes SSH client from your server - that didn't take an arm & leg to set up).

You could easily do so by just fetching the commands etc via API. Or for more advanced usage - connect via websocket. And then use term.output() etc to output the results on the screen!

I'll leave this open - in hopes that if you end up using Termino.js to do this you can possibly share the example etc for other users / developers! 👌

On that note - enjoy your weekend & hopefully we can see a demo etc - that we can add to showcase or even make a guide for! 😊

@polypoyo
Copy link

polypoyo commented May 5, 2023

Perhaps websockify would work with SSH.

@MarketingPip
Copy link
Member

MarketingPip commented May 10, 2023

@polypoyo - that would work or any other library that exposes a server via a port!

That said Termino.js out of the box does not provide support for ANSI escape sequences (but it can be added as mentioned in the wiki). As well it might run into issues when trying to execute commands / apps such as vim etc.

Tho if @wjhtinger or you happen to create a demo of using Termino.js to connect to SSH server - would be great if you should share / contribute to the community to show how this library can be used in very small to very powerful ways!

Giving an example for both if either wanting to contribute to this!

Front end client would look something like so -

// Connect to the socket.io server
let socket = io.connect('http://localhost:8080');
// Wait for data from the server
socket.on('output', function (data) {
   // Insert some line breaks where they belong
   data = data.replace("n", "<br>");
   data = data.replace("r", "<br>");
   // Append the data to our Termino instance
   term.echo(data);
});

& then the back end - would expose the server to connect to!

@MarketingPip MarketingPip added documentation Improvements or additions to documentation help wanted Extra attention is needed labels May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants