def _store_OpenSSH(key, public_file=None, private_file=None, comment=None):
    """
    Store the public and private key into a file like object using
    OpenSSH format.
    """
    if public_file:
        public_openssh = key.public().toString(type='openssh')
        if comment:
            public_content = '%s %s' % (public_openssh, comment.encode('utf-8')
                )
        else:
            public_content = public_openssh
        public_file.write(public_content)
    if private_file:
        private_file.write(key.toString(type='openssh'))
