Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Short answer: </p> <p>With ssh-agent running locally and identities added, <code>ssh -A user@host.webfaction.com</code> provides the secure shell on the remote host with the local agent's identities.</p> <p>Long answer:</p> <p>As Charles suggested, <a href="http://www.unixwiz.net/techtips/ssh-agent-forwarding.html#fwd" rel="nofollow noreferrer">agent forwarding</a> is the solution.</p> <p>At first, I thought that I could just issue an <code>ssh user@host.webfaction.com</code> and then, from within the secure session on the remote host, connect to the BitBucket repository using hg+ssh. But that failed, and so I investigated the <a href="https://superuser.com/questions/168933/extra-configuration-required-for-ssh-agent-forwarding/280938#280938">ForwardAgent and AgentForwardingEnabled flags</a>.</p> <p>Thinking that I'd have to settle for a workaround in .bashrc that involved keeping my private key on the remote host, I went looking for a shell-script solution but was spared from this kludge by this <a href="https://superuser.com/a/249712/18898">answer in SuperUser</a>, which is perfect and works without any client configuration (I'm not sure how the sshd server is configured on WebFaction). </p> <p>Aside: in my question, I posted the following:</p> <pre><code>ps aux | grep 1234.*ssh-agent` kill -SIGHUP 43210 </code></pre> <p>but this is actually inefficient and requires the user to know his/her uid (available via <code>/etc/passwd</code>). <code>pgrep</code> is much easier:</p> <pre><code>pgrep -u username process-name </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload