helpers.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:shakedown 作者: dcos 项目源码 文件源码
def validate_key(key_path):
    """ Validate a key

        :param key_path: path to a key to use for authentication
        :type key_path: str

        :return: key object used for authentication
        :rtype: paramiko.RSAKey
    """

    key_path = os.path.expanduser(key_path)

    if not os.path.isfile(key_path):
        return False

    return paramiko.RSAKey.from_private_key_file(key_path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号