Recent

Author Topic: SSH emulator via telegram  (Read 2416 times)

Renat.Su

  • Full Member
  • ***
  • Posts: 181
    • Renat.Su
SSH emulator via telegram
« on: January 06, 2019, 09:20:01 am »
Anyone interested to manage a remote computer (a web server or a regular computer with access to the Internet) via telegram client, I made a working example of the program with source code https://github.com/Al-Muhandis/ShellRemoteBot
Actively tested on Linux (Debian), but should work on Windows. Instead of webhooks, longpolling is used to get updates from telegram server, respectively, the program can work not only on a web server, but also on any home computer.
It is convenient to manage a web server via telegram in the phone (of course you can search for SSH client on the phone, but if you already have telegram, you can use this service).
The program can run as a console program that runs manually and as a service/daemon

Renat.Su

  • Full Member
  • ***
  • Posts: 181
    • Renat.Su
Re: SSH emulator via telegram
« Reply #1 on: January 06, 2019, 09:24:24 am »
Thanks to Edson for tips about SIGnals

Renat.Su

  • Full Member
  • ***
  • Posts: 181
    • Renat.Su
Re: SSH emulator via telegram
« Reply #2 on: February 15, 2020, 03:08:30 pm »
Add HTTPS proxy support... ;)

If you want to add HTTP proxy support, then:

 +   add laz_synapse.lpk depending on the project
 +   add tgsynapsehttpclientbroker to the uses block
 +   set the proxy data in the INI file. Note: The native FPHTTPClient does not yet have full HTTPS proxy support. So in the case of synapse HTTP client, to make the HTTPs proxy work in Linux (laz_synapse.lpk v40.1), comment out the line in the blcksock.pas source unit of the synapse library. // Port := IntToStr(ResolvePort(Port));
https://forum.lazarus.freepascal.org/index.php/topic,43574.msg349074.html#msg349074

Renat.Su

  • Full Member
  • ***
  • Posts: 181
    • Renat.Su
Re: SSH emulator via telegram
« Reply #3 on: May 17, 2020, 01:42:34 am »
Made an update (https://github.com/Al-Muhandis/ShellRemoteBot#script-files-macros) in the Shell Remote bot. So you can save frequent scripts for managing your server for use by the inline button

BillyKerk

  • Newbie
  • Posts: 2
Re: SSH emulator via telegram
« Reply #4 on: July 07, 2020, 01:22:00 pm »
wow...gret idea! Thank you for your work! A very useful solution. Telegram has become a multifunctional messenger that is developing into functional software ;)

Renat.Su

  • Full Member
  • ***
  • Posts: 181
    • Renat.Su
Re: SSH emulator via telegram
« Reply #5 on: July 07, 2020, 01:31:58 pm »
wow...gret idea! Thank you for your work! A very useful solution. Telegram has become a multifunctional messenger that is developing into functional software ;)
Yes, telegram as universal client... very useful. I use this code to manage my web server in any place (phone/computer)
« Last Edit: July 07, 2020, 09:07:01 pm by Renat.Su »

Renat.Su

  • Full Member
  • ***
  • Posts: 181
    • Renat.Su
Re: SSH emulator via telegram
« Reply #6 on: August 14, 2020, 10:11:39 pm »
Make first release (https://github.com/Al-Muhandis/ShellRemoteBot/releases/tag/1.0) with binaries for ShellRemoteBot (https://github.com/Al-Muhandis/ShellRemoteBot) (Telegram bot shell emulator).
Last changes - File manager functionality has been implemented. So now ShellRemoteBot you can use also as remote file manager via telegram.

While service can to browse directories and download files

 

TinyPortal © 2005-2018