def METHOD_NAME(self):
    # set up temporary directory to be used for temp files.
    self._tempdirName = tempfile.mkdtemp(prefix="key_tmp_")
    self.key = paramiko.RSAKey.generate(2048)
    keyOutput = io.StringIO()
    self.key.write_private_key(keyOutput)
    self.private_key = keyOutput.getvalue()
    self.public_key = '{} {}'.format(self.key.get_name(), self.key.get_base64())