If a target is restarted after a new rootfs has been flashed, the SSH key fingerprint check fails and this abort the connection. Since a testing target is something we trust in general, we should find a suitable workaround for that annoying issue.
Since we are using directly SSH, but instead the pxssh provided wrapper, this could be a bit more tricky.
One possible solution is to always remove the current key for the host:
and than send back a "yes" to accept the offered key at the prompt generated for the first connection.
Other approaches are resumed here:
http://linuxcommando.blogspot.co.uk/2008/10/how-to-disable-ssh-host-key-checking.html