title: Multiple printing to file
body: <p>I'm newbie with python 3.6 and I have question about printing to file multiple times using ssh commands.</p>
  
  <p>I'm trying to print multiple show commands after i create ssh session.
  The ssh session established and the first show command works fine (printed to created file).
  Any other command isn't working as the first one.</p>
  
  <p>My code:</p>
  
  <pre><code>import paramiko 
  host = '192.168.100.1'
  user = 'MyUser'
  secret = 'MyPass'
  port = 22
  ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) #Set policy to use when connecting to servers without a known host key
  ssh.connect(hostname=host, username=user, password=secret, port=port)
  file = open("output/" + host + ".txt", "w")
  stdin, stdout, stderr = ssh.exec_command('sh ver')
  output = stdout.readlines()
  file.write(''.join(output))
  stdin.flush()
  stdin, stdout, stderr = ssh.exec_command('sh arp')
  output = stdout.readlines()
  file.write(''.join(output))
  file.close()
  </code></pre>
  
  <p>I would like to get assist,
  Thanks.</p>