Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Issue 6311002: Revert "remote_access.sh: remove dependence on ssh-agent" (Closed)

Created:
9 years, 11 months ago by sosa
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Revert "remote_access.sh: remove dependence on ssh-agent" This reverts commit 78476aba5f30d213eb5ec83f3a3f6f00ed83750b. BUG= TEST=Reverted on bot and re-ran test suite Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=5c9571a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -9 lines) Patch
M remote_access.sh View 2 chunks +14 lines, -9 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sosa
TBR msb / piman
9 years, 11 months ago (2011-01-13 21:12:43 UTC) #1
Mandeep Singh Baines
9 years, 11 months ago (2011-01-13 21:34:06 UTC) #2
LGTM

As per discussion, will fix run_remote_tes.sh to not assume an ssh-agent
is running and then re-send this CL.

sosa@chromium.org (sosa@chromium.org) wrote:
> Reviewers: Mandeep Singh Baines, piman,
> 
> Message:
> TBR msb / piman
> 
> Description:
> Revert "remote_access.sh: remove dependence on ssh-agent"
> 
> This reverts commit 78476aba5f30d213eb5ec83f3a3f6f00ed83750b.
> 
> BUG=
> TEST=Reverted on bot and re-ran test suite
> 
> Please review this at http://codereview.chromium.org/6311002/
> 
> SVN Base: http://git.chromium.org/git/crosutils.git@master
> 
> Affected files:
>   M remote_access.sh
> 
> 
> Index: remote_access.sh
> diff --git a/remote_access.sh b/remote_access.sh
> index
f778fae3452e4d6f8befcdfa32c7a5e67d8aa4df..45531f15526aa4f08327e5732f08b3bb0e0b1155
> 100644
> --- a/remote_access.sh
> +++ b/remote_access.sh
> @@ -15,24 +15,22 @@ DEFINE_integer ssh_port 22 \
> 
>  # Copies $1 to $2 on remote host
>  function remote_cp_to() {
> -  REMOTE_OUT=$(scp -P ${FLAGS_ssh_port} -o StrictHostKeyChecking=no \
> -    -o UserKnownHostsFile=$TMP_KNOWN_HOSTS -i $TMP_PRIVATE_KEY $1 \
> -    root@$FLAGS_remote:$2)
> +  REMOTE_OUT=$(scp -P ${FLAGS_ssh_port} -o StrictHostKeyChecking=no -o \
> +    UserKnownHostsFile=$TMP_KNOWN_HOSTS $1 root@$FLAGS_remote:$2)
>    return ${PIPESTATUS[0]}
>  }
> 
>  # Copies a list of remote files specified in file $1 to local location
>  # $2.  Directory paths in $1 are collapsed into $2.
>  function remote_rsync_from() {
> -  rsync -e "ssh -p ${FLAGS_ssh_port} -o StrictHostKeyChecking=no \
> -             -o UserKnownHostsFile=$TMP_KNOWN_HOSTS -i $TMP_PRIVATE_KEY" \
> -    --no-R --files-from=$1 root@${FLAGS_remote}:/ $2
> +  rsync -e "ssh -p ${FLAGS_ssh_port} -o StrictHostKeyChecking=no -o \
> +            UserKnownHostsFile=$TMP_KNOWN_HOSTS" --no-R \
> +    --files-from=$1 root@${FLAGS_remote}:/ $2
>  }
> 
>  function remote_sh() {
> -  REMOTE_OUT=$(ssh -p ${FLAGS_ssh_port} -o StrictHostKeyChecking=no \
> -    -o UserKnownHostsFile=$TMP_KNOWN_HOSTS -i $TMP_PRIVATE_KEY \
> -    root@$FLAGS_remote "$@")
> +  REMOTE_OUT=$(ssh -p ${FLAGS_ssh_port} -o StrictHostKeyChecking=no -o \
> +    UserKnownHostsFile=$TMP_KNOWN_HOSTS root@$FLAGS_remote "$@")
>    return ${PIPESTATUS[0]}
>  }
> 
> @@ -42,8 +40,15 @@ function remote_sh_allow_changed_host_key() {
>  }
> 
>  function set_up_remote_access() {
> +  if [ -z "$SSH_AGENT_PID" ]; then
> +    eval $(ssh-agent)
> +    OWN_SSH_AGENT=1
> +  else
> +    OWN_SSH_AGENT=0
> +  fi
>    cp $FLAGS_private_key $TMP_PRIVATE_KEY
>    chmod 0400 $TMP_PRIVATE_KEY
> +  ssh-add $TMP_PRIVATE_KEY
> 
>    # Verify the client is reachable before continuing
>    echo "Initiating first contact with remote host"
> 
> 

Powered by Google App Engine
This is Rietveld 408576698