connect_to_instance_in_vpc.py 文件源码

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

项目:osc_cloud_builder 作者: outscale 项目源码 文件源码
def connect_to_instance_in_ssh(address, keypair_path, user='root'):
    """
    Run the command LS on a given instance
    :param address: ip or dns name of a machine
    :type address: str
    :param keypair_path: keypair path
    :type keypair_path: str
    """

    env.host_string = address
    env.user = user
    env.parallel = False
    env.key_filename = keypair_path
    env.disable_known_hosts = True
    env.connection_attempts = 10
    env.timeout = 120

    ocb.log(run('ls -la /root'), level='INFO')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号