Skip to content
/ nssh Public

Simple shell script to run remote command via ssh or copy files via scp on servers listed in $SERVERLIST variable.

Notifications You must be signed in to change notification settings

norbertc/nssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nssh and nssh-xargs

Simple script to execute remote command via ssh on servers listed in $SERVERLIST variable
Can also transfer files via scp on servers listed in $SERVERLIST variable

Prerequisite:
SSH trust on the target servers and users

Tested on RHEL6 and SLES11.

normal usage:
nssh-xargs.sh run "remote-command" (e.g. nssh-xargs.sh run "uname -a")
nssh-xargs.sh cp "file-to-transfer" [target-folder|file] (e.g. nssh-xargs.sh cp /etc/hosts /etc)

custom server list usage: (default is nssh-hostnames.txt in current directory)
e.g. SERVERLIST=/home/norbert/hostlist.txt nssh-xargs.sh run "remote-command"
     SERVERLIST=/home/norbert/hostlist.txt nssh-xargs.sh cp "file-to-transfer" [target-folder|file]

where SERVERLIST is path to a text file with a list of servers separated by new line.

custom user usage: (default is the user)
e.g. SSHUSER=root nssh-xargs.sh run "remote-command"
     SSHUSER=root nssh-xargs.sh cp "file-to-transfer" [target-folder|file]

About

Simple shell script to run remote command via ssh or copy files via scp on servers listed in $SERVERLIST variable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages