title: How to execute 'su' command using parallel-ssh
body: <p>I want to log in to two hosts using <a href="https://parallel-ssh.readthedocs.io/en/1.3.1/index.html" rel="nofollow noreferrer">parallel-ssh</a> and execute <code>su</code> command. Then I want to confirm that I am the root user by printing out <code>whoami</code></p>
  
  <p>Code:</p>
  
  <pre><code>hosts = ['myHost1', 'myHost2']
  client = ParallelSSHClient(hosts, user='myUser', password='myPassword')
  
  output = client.run_command('su')
  
  for host in output:
      stdin = output[host].stdin
      stdin.write('rootPassword\n')
      stdin.flush()
  
  client.join(output)
  
  output = client.run_command('whoami')
  
  for host, host_output in output.items():
      for line in host_output.stdout:
          print("Host [%s] - %s" % (host, line))
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>Host [myHost1] - myUser
  Host [myHost2] - myUser
  </code></pre>
  
  <p>Obviously, I expect root in the output. <a href="https://parallel-ssh.readthedocs.io/en/1.3.1/advanced.html#run-command-features-and-options" rel="nofollow noreferrer">I am following the documentation.</a> </p>
  
  <p>I've tried using all different line endings instead of <code>\n</code> and nothing has changed. 
  How can I execute <code>su</code> command using <code>parallel-ssh</code>?</p>