We study the influence of a background uniform magnetic field and boundary conditions on the vacuum of a quantized charged spinor matter field confined between two parallel neutral plates; the magnetic field is directed orthogonally to the plates. The admissible set of boundary conditions at the plates is determined by the requirement that the Dirac Hamiltonian operator be self-adjoint. It is shown that, in the case of a sufficiently strong magnetic field and a sufficiently large separation of the plates, the generalized Casimir force is repulsive, being independent of the choice of a boundary condition, as well as of the distance between the plates. The detection of this effect seems to be feasible in the foreseeable future.