Sponsored Content
Top Forums Shell Programming and Scripting Ssh to remote server loop is breaking Post 302757139 by Scott on Thursday 17th of January 2013 06:10:30 AM
Old 01-17-2013
This is a fairly common question.

The fairly common answer is to use the -n option of SSH.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SSH Remote Server issue

I have a script that connects to remote servers using a public key. Some of the servers are not set up for the public key and I receive the following when I attempt to ssh: The authenticity of host 'XXX' can't be established. RSA key fingerprint is... (1 Reply)
Discussion started by: la_womn
1 Replies

2. UNIX for Dummies Questions & Answers

Is it possible for a server to be both a remote and client SSH host?

Hi, Not sure if this is possible, I have a server (SERVER1) that is currently set up as a remote SSH host. My client SSH host (SERVER2) is connecting to SERVER1 to scp a file with no password. I now have a need to set up a third server (SERVER3) as a remote SSH host and I need SERVER1 as a... (4 Replies)
Discussion started by: tatchel
4 Replies

3. Shell Programming and Scripting

while loop stops after first iteration - remote ssh exit command problem?

I have written the following script to update some Debian boxes. #!/bin/bash mxg_hosts_file="/etc/mxg/ssh-hosts" while read line ; do mxg_host="$(echo ${line} | awk -F":" '{print $1}')" mxg_port="$(echo ${line} | awk -F":" '{print $2}')" echo "Connecting and Upgrading... (3 Replies)
Discussion started by: jelloir
3 Replies

4. Shell Programming and Scripting

Script to ssh to remote server

Hi All, I need to prepare a script. Description: Currently i am in server "x(ubuntu os)", here i need to develop a script to ssh to another server "y(ubuntu os)", i have password less authentication to "y". i have done the below #!/bin/bash #ssh to the server "y" and confirming i am... (2 Replies)
Discussion started by: kumar85shiv
2 Replies

5. UNIX for Advanced & Expert Users

Unable to ssh to remote server

Hi, I have two SunOs sparc servers mac1 and mac2. I have exchanged keys between them inorder to passwordless login ssh from mac1 to mac2. However, it is failing after authentication. Part of the debug is as below. Please suggest whats wrong and how do i fix that!! Note: i do not have... (1 Reply)
Discussion started by: mohtashims
1 Replies

6. Shell Programming and Scripting

While loop breaking when using "ssh" command inside

Hi , I am trying to read a list of hosts from a config file and trying to get file list from that host. For this I have used one while loop. cat "$ARCHIVE_CFG_FILE" | sed '/^$/d' | sed '/^#/d' | while read ARCHIVE_CFG do SOURCE_SERVER_NAME=`echo "$ARCHIVE_CFG" | awk -F '|' '{ print... (2 Replies)
Discussion started by: Anupam_Halder
2 Replies

7. Shell Programming and Scripting

Multi server access through remote server using ssh

Team, Presently I have 5 ip address kept in ip_abc1 file, for each of the ip address listed, i need to login on each ipaddress one at a time and login as below for that specific ip address ssh -p 8101 karaf@<ip.address_for the specific ip address as logged in> password features:list... (4 Replies)
Discussion started by: whizkidash
4 Replies

8. Shell Programming and Scripting

Input to while loop in remote machine using ssh

Hello I am writing a script in a local machine, i am using ssh, here i am not able to using back ticks & input file to while loop. here is my script ssh -q server1 a=`ps -ef | grep ccms | awk {print $1}` b=`ps -ef | grep mss | awk {print $1}` # above lines are not working, so i redirected... (12 Replies)
Discussion started by: nanz143
12 Replies

9. Shell Programming and Scripting

Declare and grep a variable via ssh/remote/loop

If I am running a bash command, and some awk getting the ethernet adapter on the local machine. It works fine. But if I will run it from the remote, it is EMPTY on echo and throwing error in grep. Thank you This work perfectly fine $ f=`/sbin/ip a|grep 127.127 | awk '{print $NF }' ` ; ip... (2 Replies)
Discussion started by: kenshinhimura
2 Replies
GIT-MERGE-BASE(1)						    Git Manual							 GIT-MERGE-BASE(1)

NAME
git-merge-base - Find as good common ancestors as possible for a merge SYNOPSIS
git merge-base [-a|--all] <commit> <commit>... git merge-base [-a|--all] --octopus <commit>... git merge-base --is-ancestor <commit> <commit> git merge-base --independent <commit>... DESCRIPTION
git merge-base finds best common ancestor(s) between two commits to use in a three-way merge. One common ancestor is better than another common ancestor if the latter is an ancestor of the former. A common ancestor that does not have any better common ancestor is a best common ancestor, i.e. a merge base. Note that there can be more than one merge base for a pair of commits. OPERATION MODE
As the most common special case, specifying only two commits on the command line means computing the merge base between the given two commits. More generally, among the two commits to compute the merge base from, one is specified by the first commit argument on the command line; the other commit is a (possibly hypothetical) commit that is a merge across all the remaining commits on the command line. As a consequence, the merge base is not necessarily contained in each of the commit arguments if more than two commits are specified. This is different from git-show-branch(1) when used with the --merge-base option. --octopus Compute the best common ancestors of all supplied commits, in preparation for an n-way merge. This mimics the behavior of git show-branch --merge-base. --independent Instead of printing merge bases, print a minimal subset of the supplied commits with the same ancestors. In other words, among the commits given, list those which cannot be reached from any other. This mimics the behavior of git show-branch --independent. --is-ancestor Check if the first <commit> is an ancestor of the second <commit>, and exit with status 0 if true, or with status 1 if not. Errors are signaled by a non-zero status that is not 1. OPTIONS
-a, --all Output all merge bases for the commits, instead of just one. DISCUSSION
Given two commits A and B, git merge-base A B will output a commit which is reachable from both A and B through the parent relationship. For example, with this topology: o---o---o---B / ---o---1---o---o---o---A the merge base between A and B is 1. Given three commits A, B and C, git merge-base A B C will compute the merge base between A and a hypothetical commit M, which is a merge between B and C. For example, with this topology: o---o---o---o---C / / o---o---o---B / / ---2---1---o---o---o---A the result of git merge-base A B C is 1. This is because the equivalent topology with a merge commit M between B and C is: o---o---o---o---o / / o---o---o---o---M / / ---2---1---o---o---o---A and the result of git merge-base A M is 1. Commit 2 is also a common ancestor between A and M, but 1 is a better common ancestor, because 2 is an ancestor of 1. Hence, 2 is not a merge base. The result of git merge-base --octopus A B C is 2, because 2 is the best common ancestor of all commits. When the history involves criss-cross merges, there can be more than one best common ancestor for two commits. For example, with this topology: ---1---o---A / X / ---2---o---o---B both 1 and 2 are merge-bases of A and B. Neither one is better than the other (both are best merge bases). When the --all option is not given, it is unspecified which best one is output. A common idiom to check "fast-forward-ness" between two commits A and B is (or at least used to be) to compute the merge base between A and B, and check if it is the same as A, in which case, A is an ancestor of B. You will see this idiom used often in older scripts. A=$(git rev-parse --verify A) if test "$A" = "$(git merge-base A B)" then ... A is an ancestor of B ... fi In modern git, you can say this in a more direct way: if git merge-base --is-ancestor A B then ... A is an ancestor of B ... fi instead. SEE ALSO
git-rev-list(1), git-show-branch(1), git-merge(1) GIT
Part of the git(1) suite Git 1.8.5.3 01/14/2014 GIT-MERGE-BASE(1)
All times are GMT -4. The time now is 03:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy