Execute commands on Multiple UNIX servers
To get the output from single server we can get it very easily by just executing particular command but what if we would like execute commands on multiple UNIX servers.
Use ssh to fulfill above requirement of remote execution.
kalwa1 ip 192.168.216.130
kalwa2 ip 192.168.216.131
SSH client is a program for logging into a remote machine and for executing commands on a remote machine. If command is specified, command is executed on the remote host instead of a login shell.
By using ssh client we can execute remote command on server.(username is ‘manmohan’)
$ ssh email@example.com df
Above command will gather up all mount point information. However if you put this command in script to gather information from three server as follows it will prompt for a password:
ssh firstname.lastname@example.org df
ssh email@example.com df
ssh firstname.lastname@example.org df