【问题标题】:Phing SSH Agent forwardingPhing SSH 代理转发
【发布时间】:2016-03-22 19:53:35
【问题描述】:

Phing 在服务器 A 上运行,通过 SSH 任务连接到服务器 B:

<ssh username="xxxxxx"
host="B"
pubkeyfile="/home/xxxx/.ssh/id_rsa.pub"
privkeyfile="/home/xxxx/.ssh/id_rsa.pem"
command="cd ./public_html/staging; hg pull />

它连接到服务器 B 正常,但是尝试连接到服务器 C 的 hg pull 吐回 remote: Permission denied (public key)

但是,从 A 手动 SSH 连接到服务器 B 并执行 hg pull 工作正常,这表明代理转发正在工作,因为我没有在 B 上运行任何代理,仅在 A 上运行。

有没有办法让我看到 B 确实使用了哪个公钥来尝试调试它?

【问题讨论】:

    标签: ssh phing


    【解决方案1】:

    Phing 的任务使用的 PHP 的 SSH2 似乎不支持代理转发。

    &lt;ssh&gt;任务替换为简单的exec任务,即,

    &lt;exec command="ssh xxxxxx@B 'cd ./public_html/staging; hg pull'"/&gt;

    成功了。

    【讨论】:

      猜你喜欢
      • 2012-08-20
      • 2015-07-09
      • 2012-12-25
      • 2014-07-14
      • 1970-01-01
      • 2014-02-26
      • 1970-01-01
      • 2017-06-04
      • 2012-08-10
      相关资源
      最近更新 更多