Set hosts by hostname.