title: Specify private key in SSH as string
body: <p>I can connect to a server via SSH using the -i option to specify the private key:</p>
  
  <pre><code>ssh -i ~/.ssh/id_dsa user@hostname
  </code></pre>
  
  <p>I am creating a script that takes the <code>id_dsa</code> text from the database but I am not sure how I can give that string to SSH. I would need something like:</p>
  
  <pre><code>ssh --option $STRING user@hostname
  </code></pre>
  
  <p>Where <code>$STRING</code> contains the value of <code>id_dsa</code>. I need to know the <code>--option</code> if there is one.</p>