Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Help needed on ssh in bash scripting

$
0
0
HI
I have the following requirement

I have a script a.sh which will deploy files in multiple servers .The argument for the a.sh is abc.gz host1.conf
where abc.gz is a zip file and one.conf will contain all the database connection string .

Now I have to write a b.sh which will call a.sh internally but the argument to the b.sh are three remote hosts
Code:

b.sh <host1.conf> <host2.conf> <host3.conf>
Now the host.conf will have the ip address ,so that b.sh will be executed on the that host after connection through ssh inside the bash shell script .

Please help me on this .

Viewing all articles
Browse latest Browse all 16232

Trending Articles