Sponsored Content
Operating Systems Solaris Help with executing multiple remote commands after multiple hops Post 302483121 by LinuxUser2008 on Thursday 23rd of December 2010 10:45:54 PM
Old 12-23-2010
MySQL Re: Help with executing multiple remote commands after multiple hops

Thanks again bluescreen.. Would you by any chance have any link that isnt as detailed as the one you had sent?
I tried another method and implemented the above shell using two shell scripts, one which is a wrapper sitting in the source, the other does the main functionality, and sits in the First hop server.. This seems to work fine..

I will try escaping the pipes and see if that does any good.. Thanks once more mate..

Regards,
BlubSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automating executing commands on multiple tapes and changing (loading) them

The thing that we need to be able to do is: - Scanning tapes from failed backup jobs with bscan (a bacula command) - loading the next tape with the mtx command Bscan does unload tapes but does not load them. Bscan comes with this message when it's done with a tape: Mount Volume... (0 Replies)
Discussion started by: Tr00tY
0 Replies

2. Shell Programming and Scripting

SSHing with multiple hops

Hi, I have got a shell script, which fails to run properly.. I am getting the following error: "Pseudo-terminal will not be allocated because stdin is not a terminal. Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive)." I SSH to the machine and then run the... (1 Reply)
Discussion started by: LinuxUser2008
1 Replies

3. Shell Programming and Scripting

Need help with executing multiple commands in remote machine

Hi, I work on a jumpserver and I wrote a script to transfer a file from source server to destination server. #!/bin/ksh echo "\nEnter the file name:\n" read name echo "\nSelect the Source server\n" echo "1. ODS PROD " echo "2. ODS DROPBOX" echo "3. ODS STE" echo "4. ODS STE DROPBOX"... (6 Replies)
Discussion started by: ajayakunuri
6 Replies

4. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

5. IP Networking

http over ssh tunnel using multiple hops

Hello, I got an application on a linux server that I would like to access using https and a URL. I would like to create a ssh tunnel. But, let's say the app is on box C, but box C can only be accessed through box B, that can be accessed only through box A. I would like to create the ssh tunnel... (0 Replies)
Discussion started by: Pouchie1
0 Replies

6. Shell Programming and Scripting

Executing multiple ssh commands inside a shell simultaneously

I would like to execute a commands in four different servers through ssh at a single instance(simultaneously). Below are the details with examples, ssh user1@server1 "grep xxxx logs" ssh user1@server2 "grep xxxx logs" ssh user1@server3 "grep xxxx logs" Each statement will take some... (4 Replies)
Discussion started by: Amutha
4 Replies

7. Shell Programming and Scripting

Executing multiple commands in a file at same time

Hi Am having file.ksh as below wc -l file1.txt wc -l file2.txt wc -l file3.txt wc -l file4.txt i want all the commands in this file to execute in same time please help Thanks in advance (1 Reply)
Discussion started by: ragu.selvaraj
1 Replies

8. Shell Programming and Scripting

Ssh multiple hops to execute commands with arguments

Hi I need to write a script to ssh through several hops (e.g. HostA-HostB-HostC-HostD), where Host A does not have direct assess to HostC ; HostB cannot access HostD directly. when I ssh 3 hops and run command with arg1, arg2 and redirect the output to a file, e.g. HostA> ssh -t HostB ssh -t... (3 Replies)
Discussion started by: chiensh
3 Replies

9. Shell Programming and Scripting

Ssh to multiple hosts and then run multiple for loops under remote session

Hello, I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out. I am specifically facing issues while running for loops. I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies

10. Shell Programming and Scripting

scp over multiple hops

Hi friends, I am trying to scp a file from server A to Server C via Server B (which is jump host) from Server A to Server B i have one pem key. from server B to server C I have different Pem key.. what I tried scp -r -o ProxyCommand="ssh -W %h:%p ec2-user@1.4.5.5 dmu.sh... (7 Replies)
Discussion started by: onenessboy
7 Replies
ganeti-listrunner(8)						   Version 2.5.2					      ganeti-listrunner(8)

NAME
ganeti-listrunner - Run commands in parallel over multiple machines SYNOPSIS
ganeti-listrunner -l logdir {-x executable | -c shell-cmd} {-f hostfile | -h hostlist} [-a aux-file] [-b batch-size] [-u username] [-A] DESCRIPTION
ganeti-listrunner is a tool to run commands in parallel over multiple machines. It differs from dsh or other tools in that it asks for the password once (if not using ssh-agent) and then reuses the password to connect to all machines, thus being easily usable even when public key authentication or Kerberos authentication is not available. It can run either a command or a script (which gets uploaded first and deleted after execution) on a list of hosts provided either via a file (one host per line) or as a comma-separated list on the commandline. The output (stdout and stderr are merged) of the remote execution is written to a logfile. One logfile per host is written. OPTIONS
The options that can be passed to the program are as follows: -l logdir The directory under which the logfiles files should be written. -x executable The executable to copy and run on the target hosts. -c shell-cmd The shell command to run on the remote hosts. -f hostfile The file with the target hosts, one hostname per line. -h hostlist Comma-separated list of target hosts. -a aux-file A file to copy to the target hosts. Can be given multiple times, in which case all files will be copied to the temporary directory. The executable or the shell command will be run from the (temporary) directory where these files have been copied. -b batch-size The host list will be split into batches of batch-size which will be processed in parallel. The default if 15, and should be increased if faster processing is needed. -u username Username to connect as instead of the default root username. -A Use an existing ssh-agent instead of password authentication. --args Arguments to pass to executable (-x). EXIT STATUS
The exist status of the command will be zero, unless it was aborted in some way (e.g. ^C). EXAMPLE
Run a command on a list of hosts: listrunner -l logdir -c "uname -a" -h host1,host2,host3 Upload a script, some auxiliary files and run the script: listrunner -l logdir -x runme.sh -a seed.dat -a golden.dat -h host1,host2,host3 SEE ALSO
dsh(1), cssh(1) REPORTING BUGS
Report bugs to project website (http://code.google.com/p/ganeti/) or contact the developers using the Ganeti mailing list (ganeti@google- groups.com). SEE ALSO
Ganeti overview and specifications: ganeti(7) (general overview), ganeti-os-interface(7) (guest OS definitions). Ganeti commands: gnt-cluster(8) (cluster-wide commands), gnt-job(8) (job-related commands), gnt-node(8) (node-related commands), gnt- instance(8) (instance commands), gnt-os(8) (guest OS commands), gnt-group(8) (node group commands), gnt-backup(8) (instance import/export commands), gnt-debug(8) (debug commands). Ganeti daemons: ganeti-watcher(8) (automatic instance restarter), ganeti-cleaner(8) (job queue cleaner), ganeti-noded(8) (node daemon), ganeti-masterd(8) (master daemon), ganeti-rapi(8) (remote API daemon). Ganeti htools: htools(1) (generic binary), hbal(1) (cluster balancer), hspace(1) (capacity calculation), hail(1) (IAllocator plugin), hscan(1) (data gatherer from remote clusters). COPYRIGHT
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc. Permission is granted to copy, distribute and/or modify under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. Ganeti ganeti-listrunner(8)
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy