title: I am trying to automate basics commands using python but ssh to a firewall through a console server is not successful. The terminal is getting hanged
body: <pre><code>import paramiko
  ssh = paramiko.SSHClient()
  
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  ssh.connect('10.1.1.1',port=3014,username='console',password='console')
  </code></pre>
  
  <p>After I I connect to the console server, I need to login to my firewall. I need to hit enter and then a login prompt appears followed by the password prompt.</p>
  
  <pre><code>stdin, stdout, stderr = ssh.exec_command('\n')
  stdin.write('admin')
  stdin.write('\n')
  stdin.flush()
  stdin.write('password')
  stdin.write('\n')
  stdin.flush()
  stdin.write('show version')
  output = stdout.readlines()
  print( '\n'.join(output))
  </code></pre>