当我在Fabric中运行命令时如此:
with settings(hide('everything'),
host_string='myserver',
shell='/bin/sh -c',
no_keys=True,
user='root',
password='root'):
ret = run(cmd)
我看到以下内容:
2015-09-25 11:39:10 [paramiko.hostkeys] INFO: Unable to handle key of type ecdsa-sha2-nistp521
2015-09-25 11:39:10 [paramiko.hostkeys] INFO: Unable to handle key of type ecdsa-sha2-nistp521
2015-09-25 11:39:10 [paramiko.transport] INFO: Connected (version 2.0, client OpenSSH_6.6.1_hpn13v11)
2015-09-25 11:39:10 [paramiko.transport] INFO: Authentication (publickey) failed.
2015-09-25 11:39:10 [paramiko.transport] INFO: Authentication (password) successful!
如何阻止Fabric尝试使用密钥登录?
答案 0 :(得分:0)
我已用开关 -a, - no_agent 解决了这个问题 正如Fabric帮助所说,它强制不使用正在运行的SSH代理