Make your WeChat function like ssh.
Use this simple python script, you can:
- send commands to server by WeChat just like what you will do in a ssh session.
- download files from server to WeChat.
- get log files of executed commands.
- itchat
- clone this repository to your server
git clone https://github.com/bilylee/wessh.git
- run this script in your server
cd wessh
tmux # put commands that last for a long time in tmux :)
python wessh.py
-
scan the QR code to login your WeChat account.
-
now you can send bash commands in your filehelper just like in a ssh.
CAUTION: you can only send commands by your phone since WeChat doesn't allow multiple logins in different devices. Use other devices(like computer or web browsers), this script will exit.
- you can get the help message by using the
help
command. - commands that doesn't belong to the
SIMPLE_OUTPUT_CMD
list will save their stdout and stderr to a log file. You can get this log file by usinglog
command if this is the lastest command, orlog index_number
where index_number is the integer number right below your sent command. - use
dl filepath
to download files from your server.