There were a few similar posts in forum Shell Programming and Scripting - The UNIX and Linux Forums
I propose two separate scripts, this avoids the quoting chaos with remote execution.
Just make a simple "remote_script", that will run on the remote host:
Then you pass it by this modified "solaris_command" script:
For efficiency I added -x
Hi,
I've to do a simple job many times whenever it has been asked, just i've to log in to all of fourtien HP servers and i've to execute
ps -fu user > temp
cat temp|sendmail "xyz@z.com"
commands to send the statics of all of 14 servers over the mail to particular user id..
Though logging... (4 Replies)
Experts,
Im trying to remote into a server, run a script that resides on that server and capture the information displayed & store in a local file.
I struggled with this yesterday & finally that script is working now.
Now, here is a scope creep and the script that I wrote for 1 remote... (2 Replies)
Hi,
I am running a shell script from a central server to multiple remote servers using the following code:
application_check()
{
# Linux/UNIX box with ssh key based login
SERVERS=`cat /tmp/server-details`
# SSH User name
USR="user"
# create new file
> /tmp/abc.log
# connect... (2 Replies)
I have 20 Servers (They are Windows 2003) that I remote every day using names or IP address and type in my username & Password then copy folders manually to my local computer.
I'm wondering if i can just run script(s) from my local computer to do this job without using FTP(because of security... (5 Replies)
Hi All,
I am facing problem running a script which triggers another script in multiple remote servers. my script in my local server looks like below
ssh server1 "sudo -u uname /usr/local/script/start.sh &2>&1 >/dev/null "
ssh server2 "sudo -u uname /usr/local/script/start.sh &2>&1 >/dev/null "... (7 Replies)
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh
However, when I try to pass arguments to test.sh it fails.
Any pointers would be appreciated. (7 Replies)
Hi all,
I have a problem with ftp execution within unix environment.
I'd like to get files on remote and delete them later, but here is too crowd so I can accidentally delete some files. Can I delete only the files I can get to the local folder? I can ask this question with a different... (14 Replies)
Hi all,
I am baffled on this. Solaris Irix system.:confused:
I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek:
... (10 Replies)
I have a requirement (in a shell script) to connect to several servers at once and execute a series of commands.
I am aware that ssh can be used for sequential execution. But since most of the commands that I need to execute take a long time, I have to go for the parallel option.
Is there... (2 Replies)
Hello all,
i'm trying to create a report by greping a pattern on multiple remote hosts and creta a simple report,
actually i did this, is ther any better way to do this.
#!/bin/bash
for host in `cat RemoteHosts`
do
ssh $host -C 'hostname 2>&1; grep ERROR /var/log/WebServer.log.2019-09-21... (0 Replies)