summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/SSHbase.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Plugins/SSHbase.py')
-rw-r--r--src/lib/Server/Plugins/SSHbase.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py
index 89767cf85..005b52988 100644
--- a/src/lib/Server/Plugins/SSHbase.py
+++ b/src/lib/Server/Plugins/SSHbase.py
@@ -95,11 +95,16 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.DirectoryBacked):
def HandlesEntry(self, entry):
'''Handle key entries dynamically'''
return entry.tag == 'ConfigFile' and \
- [fpat for fpat in self.keypatterns if entry.get('name').endswith(fpat)]
+ ([fpat for fpat in self.keypatterns
+ if entry.get('name').endswith(fpat)]
+ or entry.get('name').endswith('ssh_known_hosts'))
def HandleEntry(self, entry, metadata):
- '''Bind key data'''
- return self.build_hk(entry, metadata)
+ '''Bind data'''
+ if entry.get('name').endswith('ssh_known_hosts'):
+ return self.build_skn(entry, metadata)
+ else:
+ return self.build_hk(entry, metadata)
def get_ipcache_entry(self, client):
'''build a cache of dns results'''