title: How to include the private key in paramiko after fetching from string?
body: <p>I am working with paramiko, I have generated my private key and tried it which was fine. Now I am working with Django based application where I have already copied the private key in database.</p>
  
  <p>I saved my private key in <code>charField</code> in Django model. I am facing a problem in the following code:</p>
  
  <pre><code>host = "192.154.34.54"
  username = "lovestone"
  port = 25
  pkey = "------" # I saved my key in this string
  ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  ssh.connect(server, username=username, port=port, pkey=?)
  </code></pre>
  
  <p>What should I do in this case? How should I pass the private key in <code>SSH.connect</code> while I stored it in <code>string</code> in database?</p>
  
  <h2>Updated</h2>
  
  <p>Even i can't use the IO i.e. fetch the key from database and write it to a file and then use the saved file object and pass into <code>from_private_key(cls, file_obj, password=None)</code> <code>enter code here</code>because this is web based application and it is not a generic key. Every user have it's own private key.</p>