There were times when I had to share my Terminal output to a colleague or friend or technical support person to show something or get some help. Up until a few years ago, I used to screenshot the terminal or copy the output and share it via Email/IRC. Those times are long gone! There are now many applications exist to share your terminal to Web, so anyone can instantly view your terminal from anywhere and assist you in anyway possible. Today, we will discuss about one such application named Streamhut.
What is Streamhut?
Streamhut is actually a web service that allows you to instantly share your Terminal to web in real time with anyone, without actually having to install any additional software. Streamhut enables you to simply stream (or pipe) real-time data from your local terminal to a web xterm UI or even to another terminal. All you need is an Internet-enabled *nix system with "netcat" installed. As you might already know, Netcat comes pre-installed in most Linux distributions. So no additional software required! If netcat is not available for any reason, just use the streamhut CLI client.
Streamhut can also be used as a monitoring tool for long-running processes which are continuously producing output in the console. Just start the program/process in your local terminal and start monitoring it from anywhere, from any device. It is originally developed for sharing data between computers. The developer has added the terminal sharing feature later.
The common use-cases for Streamhut are give below:
- Monitor program outputs from multiple devices via web,
- Transfer data between computers/devices,
- Debug logs with colleague,
- Help a friend with programming,
- Live terminal sessions for interviews and hands-on training.
Hope you got the basic idea about Streamhut. Now let me show you how to stream and send data, terminal to web and vice versa without installing any apps. Before trying this tool, it is worth mentioning that Streamhut is still in alpha stage and is not yet ready to use in production environment. Use it at your own risk!
Share Your Terminal To Web Using Streamhut
As I already mentioned, you don't need to install anything to use Streamhut web service. Simply pipe a Linux command’s output to "nc stream.ht 1337". For instance, run the following one-liner command to stream/share your Terminal window to the web:
$ exec > >(nc stream.ht 1337) 2>&1
Streamhut web service will generate a random URL as shown below, which can be used to access your terminal window from a web browser.
streamhut: streaming to https://stream.ht/sxlrce
Now share this URL to your trusted colleague or friend. They can navigate to this URL from their web browser and view your terminal screen in real-time. Whatever you do in your local terminal will be shown in the recipient's web-browser.
Please note that they can only view the terminal, but can't interact. Meaning - they can't run any commands, copy command's output. The shared terminal session is read-only!
Here is a visual demo of Streamhut!
You can even a share a specific command's output like below:
$ echo "Welcome to ostechnix.com" | nc stream.ht 1337
As stated already, we can use Streamhut to monitor a process/program in real-time from anywhere. For example, I am going to monitor the my Linux system's uptime like below:
$ (sleep 5; watch uptime) | nc stream.ht 1337
Here, we used "sleep 5;", because delay is required to see the share URL.
Install Streamhut CLI client
If you'd like to use Streamhut regularly, it is recommended to install the streamhut CLI client. Streamhut CLI is written in GO programming language. Make sure you have installed Go programming language in your Linux system.
After installing Golong, run the following command to install Streamhut CLI client:
$ go get github.com/streamhut/streamhut/cmd/streamhut
From now on, you can stream/share Linux commands to web like below:
$ watch uptime | streamhut -d 5
Open URL directly in browser:
$ watch uptime | streamhut -o
To learn all commands and options, refer help section:
$ streamhut --help
There are a few more features available which I haven't tested yet. You can run your own Streamhut server and self-host Streamhut using Docker etc. For more details, refer the official links given at the end.
- Share And Control Terminals In Real Time From Web Browser
- Seashells – Pipe Your Linux Command’s Output To Web In Real-time
- Tmate – Share Your Terminal Instantly To Anyone From Anywhere
- Bashhub – Access Your Terminal History From Anywhere
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Reddit | Facebook | Twitter | LinkedIn | RSS feeds
Have a Good day!!