fixed problem of infinite wait for SSH to EC2 instance