Hi all,
I have 6 unix servers, i want to execute same command on the 6 unix servers.
I want a script which i will run from one machine to start and stop the remote services.
manual process
ssh ipaddress
cd /usr/scripts
ls -l
I want to automate this process thru script, i created the key gen to by pass the passowrd step.
i want in the script(test.sh)
like
ssh ipaddress
cd /usr/scripts
$1
where i want to pass the $1 from command prompt.
test.sh ls-l or test.sh df -k
i tried to write the script, i have problem in simulating the ENTER key press and append the next command after ssh ipaddress.
can you please help.
Thanks.
I have 6 unix servers, i want to execute same command on the 6 unix servers.
I want a script which i will run from one machine to start and stop the remote services.
manual process
ssh ipaddress
cd /usr/scripts
ls -l
I want to automate this process thru script, i created the key gen to by pass the passowrd step.
i want in the script(test.sh)
like
ssh ipaddress
cd /usr/scripts
$1
where i want to pass the $1 from command prompt.
test.sh ls-l or test.sh df -k
i tried to write the script, i have problem in simulating the ENTER key press and append the next command after ssh ipaddress.
can you please help.
Thanks.