Hydrolysis of terminal, non-reducing N-acetyl-beta-D-glucosamine residues in chitobiose and higher analogs, and in glycoproteins. Hydrolysis of terminal non-reducing N-acetyl-D-hexosamine residues in N-acetyl-beta-D-hexosaminides. Glycan degradation; chitin degradation. Belongs to the glycosyl hydrolase 20 family.