title: How to send Two different password in Single script, having diffrent username? unix expect scp
body: <pre><code>spawn scp USER1@XX.XX.XX.XX:/home/USER1/file.txt USER2@YY.YY.YY.YY:/home/USER2
  while {1} {                                      
                                                   
    expect {                                       
                                                   
      eof                          { break }       
      &quot;The authenticity of host&quot;   { send &quot;yes\r&quot; }
      &quot;Password:&quot; { send &quot;PWD1\r&quot; }          
      &quot;Password:&quot; { send &quot;PWD2\r&quot; }          
    }                                              
  }     
  </code></pre>