  We investigate the shear viscosity $\eta$ of the classical Yang-Mills (CYM)
field on a lattice by using the Green-Kubo formula, where the shear viscosity
is calculated from the time-correlation function of the energy-momentum tensor
in equilibrium. Dependence of the shear viscosity $\eta(g,T)$ on the coupling
$g$ and temperature $T$ is represented by a scaling function $f_\eta(g^2T)$ as
$\eta(g,T)=Tf_\eta(g^2T)$ due to the scaling-invariant property of the CYM. The
explicit functional form of $f_\eta(g^2T)$ is successfully determined from the
calculated shear viscosity: It turns out that $\eta(g,T)$ of the CYM field is
proportional to $1/g^{1.10-1.88}$ at weak coupling, which is a weaker
dependence on $g$ than that in the leading-order perturbation theory but
consistent with that of the "anomalous viscosity" $\eta\propto 1/g^{1.5}$ under
the strong disordered field. The obtained shear viscosity is also found to be
roughly consistent with that estimated through the analysis of the anisotropy
of the pressure of the CYM dynamics in the expanding geometry with recourse to
a hydrodynamic equation.
