title: How to use sshkey with subprocess
body: <p>I'm trying to connect to a router over ssh and write a command to the shell.
  I think the connection works, because I get an empty output and not an error message. I know that I have to use a keyfile to connect really on the device. Maybe that's the reason why the output is empty.</p>
  
  <p><strong>This is my code:</strong></p>
  
  <pre><code>mykey = os.path.expanduser('C:\\Users\\taaiaal1\\PycharmProjects\\hal_dmms_application\\dev_ssh')
  command = 'pcb_cli -u cwmpd pcb://ipc:[/var/run/IGD] -i \'?\''
  
  ssh = subprocess.Popen(["ssh", username + '@' + host + ':' + port, command],
                         shell=True,
                         stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE)
  result = ssh.stdout.readlines()
  print(result)
  </code></pre>
  
  <p>Where should I integrate the keyfile?</p>
  
  <p>I feel like checked every page google let me find and even in the subprocess python doc I couldn't find anything. Is this even possible? I'm using Python 3. </p>