Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a8ce62c9
authored
Jun 07, 2014
by
Bach Dániel
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove ssh host keys
fixes
#2
parent
8176e5e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
agent.py
+10
-1
No files found.
agent.py
View file @
a8ce62c9
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment