mitchellh/vagrant — comment on commit 8bb6d375f15d5bd4449573e92a1cb0577b3e678f
File:  line 0
By hedgehog:

@mitchellh this type of check needs to be done whenever you make a connection, e.g. before file uploads (maybe NET::Scp is better than NET::SSH on this point?), and issuing commands. The only time it wasn't needed was when you were sending commands to an existing connection/session.