In statistical thermodynamics, when using the method of Lagrange multipliers, we obtain an expression as $$-\ln \rho = \alpha + \beta H$$ where $\alpha$ and $\beta$ are the multipliers to be determined. Multiplying by the Boltzmann constant and averaging we obtain the entropy $$\langle S \rangle = k_\mathrm{B}\alpha + k_\mathrm{B} \beta \langle H \rangle$$ Comparing with the thermodynamic entropy for a closed system at constant composition $$S = S_0 + \frac{U}{T}$$ you obtain the value $\beta = 1/k_\mathrm{B}T$.