use remote ssh instead of expect and fix some limit