From: tamil Date: Thu, 16 May 2013 16:49:40 +0000 (-0700) Subject: added UserKnownHostsfile to ssh config X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=64dd9d1dc2c0ae20973f32b9f9ea6636b2f120d1;p=teuthology.git added UserKnownHostsfile to ssh config Signed-off-by: tamil (cherry picked from commit 7cb59d3b8274e61cb610501c24ca1520d09c2d93) --- diff --git a/teuthology/task/ssh_keys.py b/teuthology/task/ssh_keys.py index 94b43f823..dd04ac1eb 100644 --- a/teuthology/task/ssh_keys.py +++ b/teuthology/task/ssh_keys.py @@ -8,7 +8,6 @@ from cStringIO import StringIO from teuthology import contextutil import teuthology.misc as misc from ..orchestra import run -from ..orchestra.connection import create_key log = logging.getLogger(__name__) ssh_keys_user = 'ssh-keys-user' @@ -71,9 +70,15 @@ def tweak_ssh_config(ctx, config): run.wait( ctx.cluster.run( args=[ - 'echo', - 'StrictHostKeyChecking no\n', - run.Raw('>'), + 'echo', + 'StrictHostKeyChecking no\n', + run.Raw('>'), + run.Raw('/home/ubuntu/.ssh/config'), + run.Raw('&&'), + 'echo', + 'UserKnownHostsFile ', + run.Raw('/dev/null'), + run.Raw('>>'), run.Raw('/home/ubuntu/.ssh/config'), ], wait=False, @@ -164,9 +169,9 @@ def task(ctx, config): pre_run_cleanup_keys(ctx) with contextutil.nested( + lambda: tweak_ssh_config(ctx, config), lambda: push_keys_to_host(ctx, config, public_key_string, private_key_string), - lambda: tweak_ssh_config(ctx, config), - + #lambda: tweak_ssh_config(ctx, config), ): yield