title: Paramiko ssh linux command excution produces no result
body: <p>i am trying to establish connection to a raspberrypi (named as slave in the code) connected via ethernet to a master raspberrypi. The slave raspberry pi has also an static IP address.</p>
  
  <p>The following code (that is the entire code i am executing) tries to connect to the slave raspberrypi from the master raspberrypi, and issue the "echo hello" command. I have the slave connected to a screen so as far as i understand the word "hello" should be printed on the terminal.</p>
  
  <pre><code>import paramiko
  import time
  
  slave_ip='169.254.39.236'
  
  
  def connect():
      ssh_client = paramiko.SSHClient()
      ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
      connect(slave_ip, username='pi', password='raspberry')
      ssh_stdin, ssh_stdout, ssh_stderr = ssh_client.exec_command('echo hello') 
      exit_status = ssh_stdout.channel.recv_exit_status()
      print (exit_status)
  
  def main():
      connect()
  
  if __name__ == '__main__':
      while True:
          try:    
              main()
          except:
              pass    
  </code></pre>
  
  <p><strong>Questions:</strong></p>
  
  <p>1- How i can tell if the login was successful? i ask this because if i provide the wrong login information or IP, the script does not crash or return errors.</p>
  
  <p>2-Assuming the login was successful, why i do not see the output from the command?</p>