@staticmethod
def __get_public_key(key: 'typing.Union[paramiko.PKey, None]'
    ) ->'typing.Optional[str]':
    """Internal method for get public key from private.

        :param key: SSH private key
        :type key: paramiko.PKey
        :return: public key text if applicable
        :rtype: typing.Optional[str]
        """
    if key is None:
        return None
    return f'{key.get_name()} {key.get_base64()}'
