Fix SSH Connection reading problem

To fix issue #4917