title: Python SSH Connection with Paramiko & Netmiko libs
body: <p>If anyone could give a help, i have an issue with hop ssh conections.
  I can´t use (Netmiko SSH Proxy Support by Keith), maybe because i´m running in windows box.</p>
  
  <p>So I connect via <code>ssh</code> to hop server and then to router using <code>paramiko</code> lib. Next I want to pull netmiko to send/retrive commands/outputs, but I allways receive errors with the ConnectHandler when I start the ssh connection with paramiko:</p>
  
  <pre><code>ERROR:
  line 40, in &lt;module&gt;
      net_connect = ConnectHandler(device_type='cisco_ios', ip='x', username='x', password='x')
    File "build\bdist.win-amd64\egg\netmiko\ssh_dispatcher.py", line 96, in ConnectHandler
    File "build\bdist.win-amd64\egg\netmiko\base_connection.py", line 89, in __init__
    File "build\bdist.win-amd64\egg\netmiko\base_connection.py", line 396, in establish_connection
  netmiko.ssh_exception.NetMikoTimeoutException: Connection to device timed-out: cisco_ios x.x.x.x:22
  </code></pre>
  
  <p>Below my (simple) code, i am really fresh in programming, so my code can be awful :(.</p>
  
  <pre><code>import paramiko
  import netmiko
  from netmiko import ConnectHandler
  from getpass import getpass
  import time
  import re
  import sys
  
  # First ssh connection
  remote_conn_pre=paramiko.SSHClient()
  remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  remote_conn_pre.connect(ip, port=22, username=username,  
                          password=password,
                          look_for_keys=False, allow_agent=False)
  
  remote_conn = remote_conn_pre.invoke_shell()
  output = remote_conn.recv(65535)
  print output
  
  # Second SSH connection
  remote_conn.send("ssh x@ip x \n&gt;")
  time.sleep(3)
  remote_conn.send("password\n")
  output1 = remote_conn.recv(65535)
  print output1
  time.sleep(3)
  
  # Trying to run netmiko...
  net_connect = ConnectHandler(device_type='cisco_ios', ip='x.x.x.x', username='user', password='password') 
  net_connect.find_prompt()
  
  CISCO_SHOW_ACL_x = net_connect.send_command("show run | s access-list x ")
  </code></pre>