简介
TeleShellBot是我脑洞大开的时候写的一个简单的telegram机器人,可以帮你远程执行shell命令,从而让你可以在手机上操作你的服务器。
截图

教程
Github地址:https://github.com/marknote/TeleShellBot
1、安装
git clone https://github.com/marknote/TeleShellBot.git
cd TeleShellBot
npm install
git和npm安装请参考:Debian/Ubuntu/CentOS安装最新版的Node.js和NPM教程,Debian/Ubuntu/CentOS安装Git教程。
2、配置
根据Telegram instructions去创建一个机器人的UserID,然后将UserID和BOT token放到config.js里面。
module.exports = {
config:function(){
return (
{
adminUsers:[ADMIN_ID], //admin users' telegram id, should be numbers
botToken: 'YOUR_BOT_TOEKN', // bot token
}
);
}
};
3、运行
npm start
or
node index.js
原文地址:https://www.v2ex.com/t/394208
版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!
本文链接:https://www.moerats.com/archives/327/
如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。
Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。

























