title: Handling Paramiko SSHException - Server connection dropped
body: <p>I am trying to copy files from remote server to my local directory. </p>
  
  <p>I am using Python paramiko's sftp get to copy the files.</p>
  
  <pre><code>sftp.get(remote_pate, local_path)
  </code></pre>
  
  <p>After copying very few files, I get the following exception.</p>
  
  <pre><code>SSHException('Server connection dropped')
  </code></pre>
  
  <p>Establishing connection using,</p>
  
  <pre><code>ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  ssh.connect(host, username=username, password=password)
  sftp = ssh.open_sftp()
  </code></pre>
  
  <p>Why does the connection get dropped? How can I handle this? Thanks in advance.</p>