{"id":27386268,"url":"https://github.com/igorkowalczyk/discord-ssh","last_synced_at":"2025-04-13T17:18:09.413Z","repository":{"id":103102691,"uuid":"446542664","full_name":"IgorKowalczyk/discord-ssh","owner":"IgorKowalczyk","description":"🚀 Discord bot for using shell commands remotely through Discord ","archived":false,"fork":false,"pushed_at":"2025-04-12T10:31:54.000Z","size":1452,"stargazers_count":36,"open_issues_count":1,"forks_count":9,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-13T17:18:04.159Z","etag":null,"topics":["discord","discord-bot","discord-js","javascript","nodejs","ssh"],"latest_commit_sha":null,"homepage":"https://igorkowalczyk.github.io/discord-ssh","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IgorKowalczyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/codeowners","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["igorkowalczyk"]}},"created_at":"2022-01-10T18:44:30.000Z","updated_at":"2025-04-12T10:31:56.000Z","dependencies_parsed_at":"2023-09-25T08:32:12.597Z","dependency_job_id":"af1567fa-6549-4e4a-854e-c99fe5649938","html_url":"https://github.com/IgorKowalczyk/discord-ssh","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorKowalczyk%2Fdiscord-ssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorKowalczyk%2Fdiscord-ssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorKowalczyk%2Fdiscord-ssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorKowalczyk%2Fdiscord-ssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IgorKowalczyk","download_url":"https://codeload.github.com/IgorKowalczyk/discord-ssh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750123,"owners_count":21155687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discord-bot","discord-js","javascript","nodejs","ssh"],"created_at":"2025-04-13T17:18:08.913Z","updated_at":"2025-04-13T17:18:09.383Z","avatar_url":"https://github.com/IgorKowalczyk.png","language":"TypeScript","funding_links":["https://github.com/sponsors/igorkowalczyk"],"categories":[],"sub_categories":[],"readme":"![Discord.ssh](https://github.com/IgorKowalczyk/discord-ssh/assets/49127376/2c5d3d33-0b5f-4f1d-b1c6-a78360d5a129)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca aria-label=\"Discord\" href=\"https://igorkowalczyk.dev/discord\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/695282860399001640?color=5865F2\u0026logo=discord\u0026label=Discord\u0026logoColor=fff\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"Discord.js\" href=\"https://www.npmjs.com/package/discord.js\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Discord.js-v14-%2334d058?color=5865F2\u0026logo=npm\u0026logoColor=fff\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"CodeQL Checks\" href=\"https://igorkowalczyk.dev/\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/igorkowalczyk/discord-ssh/codeql-analysis.yml?branch=main\u0026label=CodeQL\u0026logo=github\u0026color=5865F2\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"GitHub License\" href=\"https://github.com/igorkowalczyk/discord-ssh\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/igorkowalczyk/discord-ssh?logo=github\u0026label=License\u0026color=5865F2\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n---\n\n## 💡 Why I made this?\n\nMy ISP won't let me open some ports on my router so I can't use SSH to connect to my server.  \nI created this bot to run shell commands on my server remotely through Discord.\n\nI can also use it to run commands on my local machine.\n\n\u003e ~**Modern problems require modern solutions**\n\n## 📦 Installation\n\n1. Clone the repo `git clone https://github.com/igorkowalczyk/discord-ssh.git`\n2. Install dependencies `pnpm install` or `npm install`\n3. Create `.env` file in the root directory\n4. Copy the content from [`.env` config](#-env-config)\n5. Fill the `.env` file with your data\n6. Run the bot `pnpm run start` or `npm run start` (or `pnpm run dev` or `npm run dev` for development)\n7. Invite the bot to your server (see [Discord Developer Portal](https://discord.com/developers/applications))\n8. Send command in channel which you set in `.env` file\n9. Wait for the response, that's it!\n\n\u003e [!IMPORTANT]\n\u003e You have to enable `Message Content` intent in your [Discord Developer Portal](https://discord.com/developers/applications) to use this bot!\n\n\u003e [!NOTE]\n\u003e Bot will not respond to messages in other channels or other members than you (bot owner) unless you change it in the `.env` file or in the code\n\n## 🔐 `.env` config\n\n```sh\n# Copy this file to .env and fill in the values.\n\nCHANNEL_ID=\"Discord channel ID\"\nOWNERS_IDS=\"ID 1,ID 2,ID 3\"\nTOKEN=\"Discord bot token\"\nCUSTOM_CWD=\"Default path to the bot's working directory (optional - remove this line if you don't need it)\"\n\n```\n\n| Variable     | Description                                       | Required |\n| ------------ | ------------------------------------------------- | -------- |\n| `CHANNEL_ID` | Channel ID where bot will listen for commands     | `✅ Yes` |\n| `OWNERS_IDS` | Users IDs who can use the bot (separated by `,`)  | `✅ Yes` |\n| `TOKEN`      | Discord bot token                                 | `✅ Yes` |\n| `CUSTOM_CWD` | Default directory for SSH commands (Default: `/`) | `❌ No`  |\n\n\u003e [!NOTE]\n\u003e You can get your Discord user ID/Cannel ID by enabling `Developer Mode` in Discord settings and right-clicking on your profile or channel.\n\n## 🔩 Limitations\n\n- `sudo` / `su` commands are not supported, and probably never will be (for security reasons).\n- Text inputs are not supported (e.g. `nano`), but you can use `echo` to create/edit files.\n- Dynamic output is not supported (e.g. `top`, `htop`).\n- Colored output is not supported and will be stripped. Some commands may not work as expected.\n\n\u003e [!NOTE]\n\u003e Changing directory (`cd`) is supported when it's at the beginning of a command (e.g. `cd /var/www \u0026\u0026 ls`)\n\n## 🌌 Future plans\n\n- [ ] Add support for ssh connection\n- [ ] Add support for dynamic output\n- [ ] Add support for text inputs\n\n## ⁉️ Issues\n\nIf you come across any errors or have suggestions for improvements, please create a [new issue here](https://github.com/igorkowalczyk/discord-ssh/issues) and describe it clearly.\n\n## 📥 Pull Requests\n\nWhen submitting a pull request, please follow these steps:\n\n- Clone [this repository](https://github.com/igorkowalczyk/discord-ssh) `https://github.com/IgorKowalczyk/discord-ssh.git`\n- Create a branch from `main` and give it a meaningful name (e.g. `my-awesome-new-feature`).\n- Open a [pull request](https://github.com/igorkowalczyk/discord-ssh/pulls) on [GitHub](https://github.com/) and clearly describe the feature or fix you are proposing.\n\n## 📋 License\n\nThis project is licensed under the MIT. See the [LICENSE](https://github.com/igorkowalczyk/discord-ssh/blob/master/license.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkowalczyk%2Fdiscord-ssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorkowalczyk%2Fdiscord-ssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkowalczyk%2Fdiscord-ssh/lists"}