Test connection with the ping command