Using an SSH keyfile with Fabric

后端 未结 8 1496
Happy的楠姐
Happy的楠姐 2020-11-28 18:42

How do you configure fabric to connect to remote hosts using SSH keyfiles (for example, Amazon EC2 instances)?

8条回答
  •  被撕碎了的回忆
    2020-11-28 19:15

    Another cool feature available as of Fabric 1.4 - Fabric now supports SSH configs.

    If you already have all the SSH connection parameters in your ~/.ssh/config file, Fabric will natively support it, all you need to do is add:

    env.use_ssh_config = True
    

    at the beginning of your fabfile.

提交回复
热议问题