Fish often swim in crystallized group formations (schooling) and orient themselves against the incoming flow (rheotaxis). At the intersection of these two phenomena, we investigate the emergence of unique schooling patterns through passive hydrodynamic mechanisms in a fish pair, the simplest subsystem of a school. First, we develop a fluid dynamics-based mathematical model for the positions and orientations of two fish swimming against a flow in an infinite channel, modelling the effect of the self-propelling motion of each fish as a point-dipole. The resulting system of equations is studied to gain an understanding of the properties of the dynamical system, its equilibria and their stability. The system is found to have five types of equilibria, out of which only upstream swimming in in-line and staggered formations can be stable. A stable near-wall configuration is observed only in limiting cases. It is shown that the stability of these equilibria depends on the flow curvature and streamwise interfish distance, below critical values of which, the system may not have a stable equilibrium. The study reveals that simply through passive fluid dynamics, in the absence of any other feedback/sensing, we can justify rheotaxis and the existence of stable in-line and staggered schooling configurations.