title: SCP getting hang
body: <p>While executing the below code. the script gets hanged. /var/backups/archives/ contains about 3 files with around 5GB in size. It copies the first file and scripts hangs.</p>
  
  <pre><code>spawn scp -rp user@10.10.234.1:/var/backups/archives/ /var/backup
  expect "user@10.10.234.1's password:"
  send "password\n"
  expect eof
  if [catch wait] {
      puts "failed"
      exit 1
  }
  exit 0
  </code></pre>