title: Identifying when scp is stalling using python
body: <p>Other Q&amp;As on Stack Overflow have already addressed how to launch SCP using Python and its standard library. How do I determine the scp transfer is stalling using python so that I can react to it?</p>
  
  <p><strong>Context</strong>
  I have access to Python 2.6 and its standard library. I am unable to use additional packages in my working environment. Rsync is also unavailable and we're forced to use scp (no ftp either).</p>
  
  <p>I'm trying to write a script that identifies a stalled transfer, ends it and restarts using a different node.</p>
  
  <p>Thanks</p>