Skip to content

ZeBraHack0/remote_exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

remote_exec

execute, log, and kill programs and sync files on multiple servers concurrently and automatically

setup

fill in the following local variables in the script according to your requirement:

  • myuser: your username in the server
  • mypasswd: your password for ssh access
  • mydocker: your docker name to access
  • SSH_LIST: your server list
  • cmd: your commands to execute on remote servers
  • key_word: keywords to grep your pids to kill
  • RE_DIR: remote directory to sync your file

start a new program

bash sync_exec.sh start

start a new program in dockers

bash sync_exec.sh docker

kill a program: modify the keyword variable in the script

bash sync_exec.sh stop

sync files from local directory to remote directories

bash sync_exec.sh file

before executing a sudo program

execute sudo commands on the server without typing passwords:

sudo vi /etc/sudoers

add the following line:

username    ALL=(ALL:ALL) NOPASSWD:ALL

adjust script execution path

add the following line in the beginning of your own script if necessary

cd $(dirname $0)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages