fabric password

前端 未结 7 1088
刺人心
刺人心 2020-11-29 23:42

Every time fabric runs, it asks for root password, can it be sent along same for automated proposes.

fab staging test
7条回答
  •  猫巷女王i
    2020-11-30 00:21

    I know you've asked about password but wouldn't it better to configure the system so that you can doing fabric (i.e. SSH) without password?

    For this, on local machine do:

    1. ssh-keygen and agree with all defaults (if you have no reasons do otherwise)
    2. cat ~/.ssh/id_rsa.pub and copy that key

    On remote machine:

    1. mkdir ~/.ssh && chmod 700 ~/.ssh
    2. touch ~/.ssh/authorized_keys2 && chmod 600 ~/.ssh/authorized_keys2
    3. Paste copied key into authorized_keys2

    From now your remote machine “trusts” your local machine and allows logging it in without password. Handy.

提交回复
热议问题