Wait for EOF on stderr before finishing SSH channel