Move openssh-server to its own module. Move the key onto the systemid device.

This commit is contained in:
Ian Gulliver
2016-04-12 05:00:04 +00:00
parent 9fb8b2bc70
commit 5a55f3bb27
3 changed files with 52 additions and 1 deletions

View File

@@ -120,6 +120,14 @@ SYSTEMID=%(system_id)s
'system_id': new_id,
})
def _GenerateSSHKey(self, root):
self._Exec(
'ssh-keygen',
'-f', os.path.join(root, 'ssh_host_ed25519_key'),
'-N', '',
'-t', 'ed25519',
)
def _Image(self):
self._PartitionAndMkFS()
root = self._Mount()
@@ -135,6 +143,7 @@ New ID: \033[91m%s\033[00m
==============
""" % new_id)
self._GenerateSSHKey(root)
def Image(self):
self._umount = []