Commit a8ce62c9 by Bach Dániel

cleanup: remove ssh host keys

fixes #2
parent 8176e5e0
......@@ -12,6 +12,7 @@ import fileinput
import platform
import sys
import tarfile
from glob import glob
from StringIO import StringIO
from base64 import decodestring
from shutil import rmtree, move
......@@ -153,14 +154,22 @@ class Context(object):
@staticmethod
def cleanup():
if system == 'Linux':
filelist = (
filelist = ((
'/root/.bash_history'
'/home/cloud/.bash_history'
'/root/.ssh'
'/home/cloud/.ssh')
+ glob('/etc/ssh/ssh_host_*'))
for f in filelist:
rmtree(f, ignore_errors=True)
if distro == 'debian':
subprocess.call(('/usr/sbin/dpkg-reconfigure',
'openssh-server'))
elif distro == 'rhel':
# TODO
pass
elif system == 'Windows':
# TODO
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment