remove leading and trailing space from server name and forbit the use of multiple spaces