Phing running on Server A, with this SSH task to connect to server 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 />
It connects to server B ok, but the hg pull
which tries to connect to server C spits back remote: Permission denied (public key)
.
However manually SSH'ing into server B from A and doing an hg pull
works fine, suggesting Agent Forwarding is working as I'm not running any agent on B, only on A.
Is there a way I can see which public key is indeed being used by B to try to debug this?