We calculate the electron shear viscosity (determined by Coulomb electron
collisions) for a dense matter in a wide range of parameters typical for white
dwarf cores and neutron star crusts. In the density range from ~10^3 g cm^-3 to
10^7-10^10 g cm^-3 we consider the matter composed of widely abundant
astrophysical elements, from H to Fe. For higher densities, 10^10-10^14 g
cm^-3, we employ the ground-state nuclear composition, taking into account
finite sizes of atomic nuclei and the distribution of proton charge over the
nucleus. Numerical values of the viscosity are approximated by an analytic
expression convenient for applications. Using the approximation of
plane-parallel layer we study eigenfrequencies, eigenmodes and viscous damping
times of oscillations of high multipolarity, l~500-1000, localized in the outer
crust of a neutron star. For instance, at l~500 oscillations have frequencies f
>= 40 kHz and are localized not deeper than ~300 m from the surface. When the
crust temperature decreases from 10^9 K to 10^7 K, the dissipation time of
these oscillations (with a few radial nodes) decreases from ~1 year to 10-15
days.Comment: 23 pages, 13 figure