From 1252e1a690c5c4f53f01ed4d06b5558cce204fd2 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 25 Jan 2010 14:48:14 -0500 Subject: no longer stop and restart ssh, rely on normal ssh service Experimentation indicates that: a.) sshd will start without ssh_host_keys in place b.) sshd does not need to be restarted to read new keys written there any new ssh connection will use new keys see LP: #512377 for example of tests that found the above. With changes to ec2-automated-builds under 512377, the keys will not exist in the image, so the unlink will be generally not needed. The ssh server may start up before this code runs, however it will have no keys availalble until this writes or generates it. --- ec2init/CloudConfig.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ec2init/CloudConfig.py b/ec2init/CloudConfig.py index d6947ce1..bb19aa72 100644 --- a/ec2init/CloudConfig.py +++ b/ec2init/CloudConfig.py @@ -176,12 +176,6 @@ class CloudConfig(): genkeys+='ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ""; ' subprocess.call(('sh', '-c', "{ %s }