How can we execute shell commands from browser shell just like google cloud linux shell?
well the request is not the problem since your "input field" is the command line, the problem is the interactivity upwards.
so towards the client a classic stream would be nice. you can ofc just add a tcp shell stream to you client. if this is an academic project I would recommend building one if not just use one of the many existing solutions.
The main problem is ofc UX. The rest is just
"client > socket > stdin" and "stdout > socket > client"
and interactive stream however plus networking is a little bit more tricky: sync, buffering, positioning, commands, incomplete packages, network loss etc.
Jason Knight
The less code you use, the less there is to break
I'm assuming you mean "Web Based SSH"... For truthiness:
en.wikipedia.org/wiki/Web-based_SSH
I always considered the approach "too risky" though -- as Scotty would say the more you overwork the plumbing the easier it is to stop up the drain; is it REALLY so hard for someone who has ANY business logging into BASH to install Putty or just use whatever flavor of terminal your *nix machine has built in?