Get SSH IP

Telegram Bot for getting SSH server connection commands

Simple Telegram bot that provides SSH connection commands to authorized users.


get_ssh_ip — Telegram Bot for getting a command to connect to your SSH server. Simple bot that provides SSH connection commands to authorized users.

SSH Connection Helper: Get SSH IP is a Telegram Bot that provides you with the command to connect to your SSH server. Perfect for when you need quick access to your server's connection details from anywhere.

  • Telegram Bot Integration — Access SSH commands via Telegram
  • Admin Authorization — Only authorized users can access the bot
  • Secure Configuration — Token and admins stored in JSON config
  • Simple Configuration — Easy setup with JSON config file
  • Lightweight — Minimal dependencies, easy to deploy

# Clone the repository
git clone https://github.com/aixandrolab/get_ssh_ip.git
cd get_ssh_ip

# Install dependencies
pip install -r requirements.txt

Configuration:

Create config.json file in the project root:

{
    "token": "your_telegram_bot_token",
    "admins": [
        "chat_id1",
        "chat_id2"
    ]
}

How to get your Telegram Bot Token:

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the instructions
  3. Copy the token provided by BotFather
  4. Paste it in the config.json file

How to get your Chat ID:

  1. Start a chat with your bot
  2. Send any message to the bot
  3. Check the bot logs or use @userinfobot to get your chat ID
  4. Add your chat ID to the admins list

Run:

python app.py

  1. User sends /start command to the bot
  2. Bot checks if the user's chat_id is in the admins list
  3. If authorized, bot returns SSH connection command
  4. If not authorized, bot denies access

  • Language: Python 3.6+
  • Framework: python-telegram-bot
  • Platform: Linux / macOS / Windows
  • License: BSD 3-Clause

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Links


Created by Aixandrolab

Copyright © 2024, A.A. Suvorov. All rights reserved.

Licensed under BSD 3-Clause License