title: Paramiko: "not a valid RSA private key file"
body: <p>I am trying connect to server using following spinet</p>
  
  <pre><code>ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  
  ip = ['x.x.x.x']
  key_file = "/Users/user/.ssh/id_rsa"
  
  key = paramiko.RSAKey.from_private_key_file(key_file)
  ssh.load_system_host_keys()
  ssh.connect(ips, port=22, username='XYZ', pkey=key, timeout=11)
  </code></pre>
  
  <p>But I am getting an error:</p>
  
  <blockquote>
    <p>not a valid RSA private key file</p>
  </blockquote>