ssh check buffer fix