changing order for ssh command, and a timeout for maintenance mode exit