The shear viscosity in the dilute regime of a model for confined granular matter is studied by simulations and kinetic theory. The model consists on projecting into two dimensions the motion of vibrofluidized granular matter in shallow boxes by modifying the collision rule: besides the restitution coefficient that accounts for the energy dissipation, there is a separation velocity that is added in each collision in the normal direction. The two mechanisms balance on average, producing stationary homogeneous states. Molecular dynamics simulations show that in the steady state the distribution function departs from a Maxwellian, with cumulants that remain small in the whole range of inelasticities. The shear viscosity normalized with stationary temperature presents a clear dependence with the inelasticity, taking smaller values compared to the elastic case. A Boltzmann-like equation is built and analyzed using linear response theory. It is found that the predictions show an excellent agreement with the simulations when the correct stationary distribution is used but a Maxwellian approximation fails in predicting the inelasticity dependence of the viscosity. These results confirm that transport coefficients depend strongly on the mechanisms that drive them to stationary states.