title: SSH into switch using paramiko module
body: <p>I am able to open a ssh session into switch using paramiko. Able to enter the commands and gets it respective output.
  My question is that I want to enter many command into the switch simultaneously. But before entering new command, wanted to know that previous command is successfully entered into the switch.For example</p>
  
  <p>switch>enable
  switch#
  switch#config t
  switch(config)
  Enter the 2nd command, until i see # sign and 3rd command untill i see config.
  Following is the code i am using</p>
  
  <pre><code>import paramiko
  ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  ssh.connect('ip-address',username='username', password='password')
  list =['enable','config t']
  command = '\n'.join(list)
  #for i in range(len(list)):
  print command
  stdin,stdout,stderr = ssh.exec_command(command)
  print(stdout.read())
  </code></pre>