Connect your machine to a Telegram-SSH bot

Author: yakiro

If you've ever found yourself with an urgent need to monitor a remote machine, you know how frustrating it can be. Oftentimes, you need a complex networking setup and a laptop to connect via ssh. But what happens when you don't have a computer nearby? Or when connected to a limited WiFi network that allows only messaging traffic (which is usually the case during flights)?

Enter Loopback

Loopback connects your machine to a variety of messaging apps (such as Telegram, Whatsapp, Slack, etc.) so you can monitor and control your servers from anywhere.

You just need to run loopbackd up on your machine and are ready to go. Loopback creates a bi-directional web-socket-based tunnel with our servers that automatically redirect webhook calls from different messaging APIs to your server.

Then, loopback receives authorized commands through the tunnel, executes them on the machine, and replies with the result of the command. On most platforms, it also enables file transfers, so you can upload a configuration file or download a log directly to your device.

Here is a short demonstration with Telegram:

Why Messaging?

There are several reasons one would want to use a messaging application to monitor its servers, especially with today's plethora of monitoring solutions. The first reason is accessibility. You probably already have several messaging applications on your mobile device that you use daily. The best part is that messaging protocol traffic is not blocked even on restricted public networks. The second reason is the ease of use. No interface feels more native for a seasoned sys admin than a shell, and messaging is a great alternative when you need to run a few commands to restart a service or start a CI job when away from your computer. Finally, text-based monitoring opens the door for complex automation that can be defined, and we think that it should be encouraged when comparing to solutions that are using proprietary UIs that do not play nicely together.

Getting Started

The service is up and running today for Telegram, and we are currently working on adding support for more messaging platforms and adding a bunch of new features.

You can get a taste of the service using our existing Telegram bot which automatically provisions a new VM for you.

If you want to connect the bot to your own machines, follow these steps:

  1. Download and install loopbackd
curl -sL | sudo bash
  1. Get authroization code
loopbackd up
  1. Send the authroization key to @LoopbackAIBot

You can find the source code of our daemon here

If you have any feedback or questions, please let us know in our Discord channel or by emailing us at