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:
ssh-keygen
and agree with all defaults (if you have no reasons do otherwise)
cat ~/.ssh/id_rsa.pub
and copy that key
On remote machine:
mkdir ~/.ssh && chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys2 && chmod 600 ~/.ssh/authorized_keys2
- Paste copied key into
authorized_keys2
From now your remote machine “trusts” your local machine and allows logging it in without password. Handy.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…