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:
- Open Telegram and search for @BotFather
- Send
/newbotand follow the instructions - Copy the token provided by BotFather
- Paste it in the
config.jsonfile
How to get your Chat ID:
- Start a chat with your bot
- Send any message to the bot
- Check the bot logs or use @userinfobot to get your chat ID
- Add your chat ID to the
adminslist
Run:
python app.py
- User sends
/startcommand to the bot - Bot checks if the user's chat_id is in the admins list
- If authorized, bot returns SSH connection command
- 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