Skip to content

Utility for sending commands to hosts and recieve messages from this one

License

Notifications You must be signed in to change notification settings

lobz1g/ssh-multy-cmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssh-multy-cmd

Small utility for sending some commands to different hosts and receive response from this one

Configuration

In config/config.json placed fields for connection to hosts

[
  {
    "host": "host1:port_for_host1",
    "user": "user_for_host1",
    "password": "pass_for_host1",
    "cmd": "command_for_host1"
  },
  {
    "user": "user",
    "password": "pass",
    "host": "127.0.0.1:22",
    "cmd": "ls -l"
  }
]

Output

There are two outputs channels. Console and file. YOU NEED TO CEREATE FOLDER log

  • In the console will be symbol X for bad response or some errors and symbol V for good result
  • In the file will be detail information about error/response

File can be named:

  • host.log for response from the host. e.g 127_0_0_1.log
  • localhost.log for errors