Using a variational method we study a sequence of the one-electron atomic and molecular-type systems H, ${\mathrm{H}}_{2}^{+},$ ${\mathrm{H}}_{3}^{2+},$ and ${\mathrm{H}}_{4}^{3+}$ in the presence of a homogeneous magnetic field in the range $B=0--4.414\ifmmode\times\else\texttimes\fi{}{10}^{13} \mathrm{G}.$ These systems are taken as a linear configuration aligned with the magnetic lines. For ${\mathrm{H}}_{3}^{2+}$ the potential energy surface has a minimum for $B\ensuremath{\sim}{10}^{11} \mathrm{G}$ which deepens with growth of the magnetic field strength (A. Turbiner, J. C. L\'opez, and U. Sol\'{\i}s, Pis'ma Zh. \'Eksp. Teor. Fiz. 69, 800 (1999) [JETP Lett. 69, 844 (1999)]); for $B\ensuremath{\gtrsim}{10}^{12} \mathrm{G}$ the minimum of the potential energy surface becomes sufficiently deep to have longitudinal vibrational state. We demonstrate that for the $(\mathrm{ppppe})$ system the potential energy surface at $B\ensuremath{\gtrsim}4.414\ifmmode\times\else\texttimes\fi{}{10}^{13} \mathrm{G}$ develops a minimum, indicating the possible existence of exotic molecular ion ${\mathrm{H}}_{4}^{3+}.$ We find that for almost all accessible magnetic fields ${\mathrm{H}}_{2}^{+}$ is the most bound one-electron linear system while for magnetic fields $B\ensuremath{\gtrsim}{10}^{13} \mathrm{G}$ the molecular ion ${\mathrm{H}}_{3}^{2+}$ becomes the most bound.