Skip to content
/ TR-CMD Public
forked from MParvin/TR-CMD

Telegram Remote Command Execution Bot - Safe & Easy way to run commands on remote Linux server (Without SSH)

Notifications You must be signed in to change notification settings

PSS1998/TR-CMD

 
 

Repository files navigation

TSMB

Telegram Server Manager Bot - Safe & Easy run command in your RaspberryPi, PC or server from every where.

How to install and use:

  1. To begin, you'll need an Access Token. If you already read and followed Introduction to the API, you can use the one you generated then. If not: To generate an Access Token, you have to talk to @BotFather and follow a few simple steps (described here). You should really read the introduction first, though. Source: Your first bot from python-telegram-bot

  2. First install some dependencies: Best way is use Virtualenv:

virtualenv -p python3 .env
source .env/bin/activate
pip install -r requirements.txt

Install these package for using htop command:

In debian base:

apt-get install htop aha

In RHEL base:

yum install htop
git clone https://github.com/theZiz/aha.git
cd aha
make
make install
  1. After create your bot and get your Token from botFather, send some text(more than two message) to your bot and use this command to find your chat_id: use @userinfobot bot to get your chat_id by sending /start to bot. Copy config.example to config and put your chat_id and Token (in step1) in config file.
cp config.example config
  1. Run code:
python bot.py
  1. Send you command: send any command you want like:
ps -aux

Sample of htop output:

To get a snapshot of htop, send /htop command to bot, output will be like this:

htop output

About

Telegram Remote Command Execution Bot - Safe & Easy way to run commands on remote Linux server (Without SSH)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 55.7%
  • Shell 43.1%
  • Dockerfile 1.2%