Git Product home page Git Product logo

meh7an / teleminal Goto Github PK

View Code? Open in Web Editor NEW
19.0 1.0 0.0 421 KB

Source code of t.me/TeleminalBot: A simple tool for managing servers using SSH connections. With it, you can also easily create connection messages to share with friends. You can also link a connection to your account using CloudStorage for multi-device easy access.

Home Page: https://t.me/teleminalbot

JavaScript 65.57% HTML 8.48% CSS 25.95%
telegram-miniapp-contest-2023

teleminal's Introduction

Teleminal - Telegram SSH Mini App Bot

This is a Telegram bot that allows you to access a terminal SSH mini app directly from your Telegram chat. The app is divided into two parts:

  1. Web (Located in the client folder)

    • The UI is not using any frameworks, and it's written in plain JavaScript.
  2. Server (Located in the server folder)

    • WebSocket server that the web part connects to for SSH communication
    • SSH client that connects to the WebSocket server and executes commands on the server
    • Express server that serves the web part
    • Telegram bot (written by GrammyJS) to control the bot interface

Configuration

Follow these steps to configure and run the Telegram SSH Mini App Bot:

  1. Clone the Repository: Clone this repository to your local machine.

    git clone https://github.com/meh7an/Teleminal.git
    cd Teleminal
  2. Set Up Telegram Bot:

    • Create a bot on Telegram and obtain the API token from BotFather.

    • Create an .env file in the root directory and update the following variables:

      TOKEN=YOUR_TELEGRAM_BOT_TOKEN
      BOT_ID=YOUR_BOT_ID
      APP_ID=YOUR_APP_ID
      URL=YOUR_APP_URL
      PORT=YOUR_SERVER_PORT
      
  3. Install Dependencies:

    • Install the required dependencies.

      # In the root directory
      npm install
      
  4. Start the App:

    • Run the following command to start both the web interface and the Telegram bot.

      # In the root directory
      npm run start
      

Your Telegram SSH Mini App Bot should now be up and running. You can interact with the bot in your Telegram bot to open and use the SSH mini app.

Usage

To add a new server to the Telegram SSH Mini App Bot, follow these steps:

  1. Start a chat with the bot on Telegram.

  2. Send the /addserver command to the bot and tap on "Add Server". You can also open the interface directly by bot's menu button, but you need to configure it in the BotFather.

  3. Share the necessary server information with the bot. This typically includes the server's hostname or IP address, SSH port, username, and password or SSH key, depending on your authentication method.

  4. After sharing the server information, the bot will process it and establish a connection to the server.

  5. Once the connection is established, you will receive a connection message indicating that the server has been added successfully. Also, you will get the connection information from the bot's chat.

  6. You can also send the /shortcut command to create a shareable shortcut directly using the bot interface.

Enjoy using your Telegram SSH Mini App Bot! If you encounter any issues or have questions, please refer to the GitHub Issues.

teleminal's People

Contributors

meh7an avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.