Sponsored Content
Full Discussion: Run a script on remote host
Top Forums UNIX for Dummies Questions & Answers Run a script on remote host Post 302545358 by zaxxon on Monday 8th of August 2011 06:37:27 AM
Old 08-08-2011
You did not answer that you made sure, that sshd is running on machineB. There is no firewall between them? Can you reach machineB on any other port than ssh? Start with ping for basic network reachability. Then maybe add ftp or whatever daemons you have up and running on machineB.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

2. Shell Programming and Scripting

Plz help me using expect script for remote host

I am newbie in Unix and Expect script, so please help me :( I'm using expect script for remote another host: #!/usr/bin/expect -f set timeout 10 spawn ssh -l root 10.120.18.4 expect "password:" send "password\r" expect "@" interact And now how can i use expect script for access mysql... (2 Replies)
Discussion started by: wormym
2 Replies

3. Shell Programming and Scripting

manage an interactive script on a remote host

OS~AIX 6.1 I'm running an interactive shell script i.e.,waits for a user response a few times while executing, after doing ssh to a AIX server. I'm just wondering what options I have if the ssh connection to the server is lost while executing the script, do I have to run the script again, which in... (2 Replies)
Discussion started by: mbak
2 Replies

4. Shell Programming and Scripting

HTML Code to Run a Script from Remote Unix Host

Hi All, Noticed few posts around this but coudnt get exatcly what i wanted. Thanks for your help again. I have a script running on a remote machine and i normally ssh from putty and run the script manually. Is there anyway that i can write an HTML Code with a button so taht when I Click... (1 Reply)
Discussion started by: robinbannis
1 Replies

5. Shell Programming and Scripting

How to run a shell script on a remote host using ftp

Hi, is there a way I can run a shell script through ftp on a remote host? The remote host doesn't have ssh running so I can't use ssh. (7 Replies)
Discussion started by: mrskittles99
7 Replies

6. Shell Programming and Scripting

Pause processes in remote host and resume execution in another remote host

Hi, Given addresses of 2 remote machines, using a shell script is it possible to get the state of running processes in "src" stop all the processes in "src" exit out of "src" ssh into "dest" resume the state of executing processes captured in step 1 in "dest" Assumption: "src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies

7. Shell Programming and Scripting

Run script on remote host

Hi friends, I have two servers. Server A and B. I want to run one script on server A by logging in to server B. Can anyone provide me code for this.? I tried it by using following ssh username@serverA ./script Then it prompt me the password. I give correct password of the server A. but it... (7 Replies)
Discussion started by: Nakul_sh
7 Replies

8. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

9. Shell Programming and Scripting

Last part of script to remote host not working...

Hi, I got most of the script working, last part which does the ssh to remote and execute the command not working. for SSH in ${HostList}; do echo ${SSH} echo "" SSH2SEND=ssh user@${SSH} curl -v $URL echo $SSH2SEND done error message I am getting ... (5 Replies)
Discussion started by: samnyc
5 Replies

10. Shell Programming and Scripting

Run awk command on remote host

I have below command to check for error logs from last 24 hours from the file : /var/log/messages/ The command is working fine on the local host. sudo awk -F - -vDT="$(date --date="24 hours ago" "+%b %_d %H:%M:%S")" ' DT < $1' /var/log/messages | egrep -i "error|fail" I want to run the... (8 Replies)
Discussion started by: rahul2662
8 Replies
GIT-BUNDLE(1)							    Git Manual							     GIT-BUNDLE(1)

NAME
git-bundle - Move objects and refs by archive SYNOPSIS
git bundle create <file> <git-rev-list-args> git bundle verify <file> git bundle list-heads <file> [<refname>...] git bundle unbundle <file> [<refname>...] DESCRIPTION
Some workflows require that one or more branches of development on one machine be replicated on another machine, but the two machines cannot be directly connected, and therefore the interactive Git protocols (git, ssh, rsync, http) cannot be used. This command provides support for git fetch and git pull to operate by packaging objects and references in an archive at the originating machine, then importing those into another repository using git fetch and git pull after moving the archive by some means (e.g., by sneakernet). As no direct connection between the repositories exists, the user must specify a basis for the bundle that is held by the destination repository: the bundle assumes that all objects in the basis are already in the destination repository. OPTIONS
create <file> Used to create a bundle named file. This requires the git-rev-list-args arguments to define the bundle contents. verify <file> Used to check that a bundle file is valid and will apply cleanly to the current repository. This includes checks on the bundle format itself as well as checking that the prerequisite commits exist and are fully linked in the current repository. git bundle prints a list of missing commits, if any, and exits with a non-zero status. list-heads <file> Lists the references defined in the bundle. If followed by a list of references, only references matching those given are printed out. unbundle <file> Passes the objects in the bundle to git index-pack for storage in the repository, then prints the names of all defined references. If a list of references is given, only references matching those in the list are printed. This command is really plumbing, intended to be called only by git fetch. <git-rev-list-args> A list of arguments, acceptable to git rev-parse and git rev-list (and containing a named ref, see SPECIFYING REFERENCES below), that specifies the specific objects and references to transport. For example, master~10..master causes the current master reference to be packaged along with all objects added since its 10th ancestor commit. There is no explicit limit to the number of references and objects that may be packaged. [<refname>...] A list of references used to limit the references reported as available. This is principally of use to git fetch, which expects to receive only those references asked for and not necessarily everything in the pack (in this case, git bundle acts like git fetch-pack). SPECIFYING REFERENCES
git bundle will only package references that are shown by git show-ref: this includes heads, tags, and remote heads. References such as master~1 cannot be packaged, but are perfectly suitable for defining the basis. More than one reference may be packaged, and more than one basis can be specified. The objects packaged are those not contained in the union of the given bases. Each basis can be specified explicitly (e.g. ^master~10), or implicitly (e.g. master~10..master, --since=10.days.ago master). It is very important that the basis used be held by the destination. It is okay to err on the side of caution, causing the bundle file to contain objects already in the destination, as these are ignored when unpacking at the destination. EXAMPLE
Assume you want to transfer the history from a repository R1 on machine A to another repository R2 on machine B. For whatever reason, direct connection between A and B is not allowed, but we can move data from A to B via some mechanism (CD, email, etc.). We want to update R2 with development made on the branch master in R1. To bootstrap the process, you can first create a bundle that does not have any basis. You can use a tag to remember up to what commit you last processed, in order to make it easy to later update the other repository with an incremental bundle: machineA$ cd R1 machineA$ git bundle create file.bundle master machineA$ git tag -f lastR2bundle master Then you transfer file.bundle to the target machine B. Because this bundle does not require any existing object to be extracted, you can create a new repository on machine B by cloning from it: machineB$ git clone -b master /home/me/tmp/file.bundle R2 This will define a remote called "origin" in the resulting repository that lets you fetch and pull from the bundle. The $GIT_DIR/config file in R2 will have an entry like this: [remote "origin"] url = /home/me/tmp/file.bundle fetch = refs/heads/*:refs/remotes/origin/* To update the resulting mine.git repository, you can fetch or pull after replacing the bundle stored at /home/me/tmp/file.bundle with incremental updates. After working some more in the original repository, you can create an incremental bundle to update the other repository: machineA$ cd R1 machineA$ git bundle create file.bundle lastR2bundle..master machineA$ git tag -f lastR2bundle master You then transfer the bundle to the other machine to replace /home/me/tmp/file.bundle, and pull from it. machineB$ cd R2 machineB$ git pull If you know up to what commit the intended recipient repository should have the necessary objects, you can use that knowledge to specify the basis, giving a cut-off point to limit the revisions and objects that go in the resulting bundle. The previous example used the lastR2bundle tag for this purpose, but you can use any other options that you would give to the git-log(1) command. Here are more examples: You can use a tag that is present in both: $ git bundle create mybundle v1.0.0..master You can use a basis based on time: $ git bundle create mybundle --since=10.days master You can use the number of commits: $ git bundle create mybundle -10 master You can run git-bundle verify to see if you can extract from a bundle that was created with a basis: $ git bundle verify mybundle This will list what commits you must have in order to extract from the bundle and will error out if you do not have them. A bundle from a recipient repository's point of view is just like a regular repository which it fetches or pulls from. You can, for example, map references when fetching: $ git fetch mybundle master:localRef You can also see what references it offers: $ git ls-remote mybundle GIT
Part of the git(1) suite Git 1.8.5.3 01/14/2014 GIT-BUNDLE(1)
All times are GMT -4. The time now is 05:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy