summaryrefslogtreecommitdiff
path: root/ec2init
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-01-25 14:48:14 -0500
committerScott Moser <smoser@ubuntu.com>2010-01-25 14:48:14 -0500
commit1252e1a690c5c4f53f01ed4d06b5558cce204fd2 (patch)
treed31735f969ba745f01ccfa4aa68689fc4fdc7944 /ec2init
parent8938982d6ab1e3843004e19c485f73e3401c767a (diff)
downloadvyos-cloud-init-1252e1a690c5c4f53f01ed4d06b5558cce204fd2.tar.gz
vyos-cloud-init-1252e1a690c5c4f53f01ed4d06b5558cce204fd2.zip
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.
Diffstat (limited to 'ec2init')
-rw-r--r--ec2init/CloudConfig.py8
1 files changed, 0 insertions, 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 } </dev/null" % (genkeys)))
- # it is possible that an ssh job started either
- # before the files above were unlinked, or while only one of
- # our generated keys were written. In either case, stop that job
- # if anything started from here out it would be ok.
- subprocess.call(('stop', 'ssh'))
-
try:
user = util.get_cfg_option_str(self.cfg,'user')
disable_root = util.get_cfg_option_bool(self.cfg, "disable_root", True)
@@ -192,8 +186,6 @@ class CloudConfig():
send_ssh_keys_to_console()
- subprocess.call(('start', 'ssh'))
-
def h_ec2_ebs_mounts(self,name,args):
print "Warning, not doing anything for config %s" % name