0.9.1 • Published 3 years ago

hubot-ssh2cmd v0.9.1

Weekly downloads
8
License
ISC
Repository
github
Last release
3 years ago

hubot-ssh2cmd

Hubot to run ssh commands

Installation

In your hubot repository, run:

npm install hubot-ssh2cmd --save

Then add hubot-ssh2cmd to your external-scripts.json:

["hubot-ssh2cmd"]

Configuration

Environment VariableRequired?Description
HUBOT_SSH2CMD_CFGYesConfig file of ssh hosts, passwords, keys, commands, etc.

Example json configuration of alias dictionary along with server definitions.

{
    "ls": { 
        "server":        { 
            "host":         "127.0.0.1",
            "userName":     "username",
            "privateKey":   "/home/user/.ssh/id_rsa"
            },
        "commands":      [ "ls -l" ]
    },
    "date": { 
        "server":        { 
            "host":         "127.0.0.1",
            "userName":     "username",
            "privateKey":   "/home/user/.ssh/id_rsa"
            },
        "commands":      [ "date" ]
    }
}

More advanced configurations are allowed and can be found at https://github.com/cmp-202/ssh2shell

Example interactions

Trigger an alias that contains predefined ssh commands:

myhubot> myhubot ssh2cmd date
myhubot> Connected
Ready
127.0.0.1: date
Thu May 28 03:27:16 UTC 2020
[dpeng@centos ~]$

Resources

0.9.1

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago