Let \(r_s(n)\) denote the number of representations of n as a sum of s squares. Hurwitz established eleven identities expressing the generating function of \(r_3(an+b)\) as a simple infinite product. In 2004, Cooper and Hirschhorn proved that the generating functions of certain infinite families of arithmetic sequences in \(r_3(n)\) are expressible as linear combinations of two given generalized eta-quotients. In this paper, utilizing three classical theta function identities of Ramanujan, we prove that for any \(k\ge 0\) and \(t\ge 2\) , the generating functions \(\sum _{n=0}^\infty r_{2t-1}\big (2^{2k}n\big )q^n\) , \(\sum _{n=0}^\infty r_{2t-1}\big (2^{2k+1}n\big )q^n\) and \(\sum _{n=0}^\infty r_{2t}\big (2^kn\big )q^n\) can be expressed as linear combinations of specific generalized eta-quotients. This significantly generalizes some results of Barrucand, Cooper and Hirschhorn (Ramanujan J 6(3): 347–367, 2002). As a direct application, we derive many internal congruences modulo high powers of 2 for \(r_s(n)\) with \(8\le s\le 20\) . Further, for any \(s\ge 3\) , we conjecture the existence of internal congruence families modulo high powers of 2 satisfied by \(r_s(n).\)