Friday, May 3, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1772  / 2 Years ago, sat, october 8, 2022, 10:58:03

I'm building a command line utility and one of my clients (who's not so computer savvy) wants to have access to it.



I was wondering, is there anything available that would let me redirect stdin/stout for a terminal app to a port as a website? This would save me a lot of time. Surely, there must be an Ubuntu one-liner that can accomplish such a feat...



Thanks for any pointers!


More From » command-line

 Answers
7

The problem is slightly more complicated than simply "redirecting stdin/stdout" to a port.



What you need is basically a shell session to your server with a client which runs inside a browser. This answer links to two such shells, AjaxTerm and WebShell




Ajaxterm is a web based terminal. It was totally inspired and works
almost exactly like http://anyterm.org/ except it's much easier to
install




enter image description here



What worries me a bit is that both programs were last updated in 2008, which in web-years like 50 years ago. Please report back if you manage to run any of them.



A newer and seemingly more supported option is Shell In A Box:




Shell In A Box implements a web server that can export arbitrary
command line tools to a web based terminal emulator. This emulator is
accessible to any JavaScript and CSS enabled web browser and does not
require any additional browser plugins. Most typically, login shells
would be exported this way: shellinaboxd -s /:LOGIN



This command starts a web server at http:// localhost :4200 that allows
users to login with their username and password and to get access to
their login shell.



All client-server communications are encrypted, if SSL/TLS
certificates have been installed.




It is even available in Ubuntu repositories and can be installed with



sudo apt-get install shellinabox

[#33467] Sunday, October 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leadprogres

Total Points: 298
Total Questions: 114
Total Answers: 139

Location: Samoa
Member since Mon, Nov 8, 2021
3 Years ago
;