title: Run nohup and eval from python
body: <p>I need run two commands (from shell looks like)</p>
  
  <pre><code>$ eval `ssh-agent -s`
  Agent pid 8631
  $ ssh-add ~/.ssh/user</code></pre>
  
  <p><strong>Note</strong>: The key is in /home/user/.ssh/user and is correct</p>
  
  <p>Run is as bash script works as charm:</p>
  
  <pre><code>#!/bin/bash
  nohup `eval `ssh-agent -s`` >/dev/null 2>&1 &
  ssh-add ~/.ssh/$user</code></pre>
  
  <p>but from python I can't get working, <strong>ssh-agent</strong> is started but <strong>ssh-add</strong> returns:<br/>
  <em>Could not open a connection to your authentication agent.</em></p>
  
  <pre class="lang-py prettyprint-override"><code>import os
  os.system('nohup \'eval `ssh-agent -s`\' &amp;')
  os.system('ssh-add /home/user/.ssh/user')
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre class="lang-py prettyprint-override"><code>import os
  system('nohup sh -c \'eval `ssh-agent -s`\' &amp;')
  </code></pre>
  
  <p>same problem ssh-agent started, but somehow I can't connected</p>