A Slack bot to SSH
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.eslintrc.json [stub] start dev Jun 29, 2016
.gitignore First commit Jun 29, 2016
LICENSE.md Update LICENSE.md Jun 29, 2016
Procfile Add Procfile Jun 29, 2016
README.md Add SSH_TIMEOUT Jul 1, 2016
app.json Add SSH_PREFIX_CMD Jul 1, 2016
gulpfile.js Add gulp Jun 29, 2016
index.js Add SSH_TIMEOUT Jul 1, 2016
package.json 0.3.0 Jul 1, 2016


SSH Slack bot

A Slack bot to send SSH commands.


example image 1 example image 2 example image 3


These are environment variables the bot need :

  • SSH_USER : SSH user

  • SSH_HOST : SSH server

  • SSH_PASSWORD : (optional) SSH password

  • SSH_KEY : (optional) SSH private key

    Example (need to be multiline) :

    export SSH_KEY="-----BEGIN RSA PRIVATE KEY-----
    -----END RSA PRIVATE KEY-----"
  • SSH_PREFIX_CMD : (optional) String to use as prefix of every command send

    Examples :

    SSH_PREFIX_CMD=ls will allow you to build a @ls bot. Simply call @ls /my/dir, @ls -all, ...

    SSH_PREFIX_CMD=docker will allow you to build a @docker bot. Simply call @docker ps, @docker rm test, ...

  • SSH_TIMEOUT : (optional, default 4 seconds) Number of seconds after the server should have ended his response. Prevent interactive commands to lock the app.

  • SLACK_API_TOKEN : Slack token of your bot




git clone https://github.com/guillaumewuip/ssh-slack-bot && cd ssh-slack-bot
npm install
node index.js #with correct env var