title: How can I use ssh with python and linux to connect to windows and run commands?
body: <p>I wrote a generic script on Python that supports Windows and Unix ssh connection from Unix.</p>
  
  <p>When I try Unix command from Unix to create dir in Windows, I get exit 53</p>
  
  <pre><code>/usr/bin/ssh2 --password pass -l admin ip_address mkdir "C:\Temp\ALEX_TEST_EX" &amp;
  </code></pre>
  
  <p>When I write only <code>/usr/bin/ssh2 --password pass -l admin ip_address</code>, it is Ok. I login to Windows</p>
  
  <p>When I try <code>C:\Temp\ALEX_TEST_EX</code> on this machine manually it is also Ok.</p>
  
  <p>What is problem?</p>
  
  <p>I also try to use with Python ssh2 command like</p>
  
  <pre><code>import paramiko
  ssh = paramiko.SSHClient()
  ssh.connect("ip_address", username="admin", password="pass")
  </code></pre>
  
  <p>but I get exceptions</p>
  
  <blockquote>
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/python3.5/site-packages/paramiko/client.py", line 402, in connect
      self, server_hostkey_name, server_key
    File "/python3.5/site-packages/paramiko/client.py", line 768, in missing_host_key
     'Server {!r} not found in known_hosts'.format(hostname)
  paramiko.ssh_exception.SSHException: Server 'X.Y.Z.W' not found in known_hosts
  </code></pre>
  </blockquote>