A method for centring a first mechanical part and a second mechanical part relative to each other, the centring method comprising the following steps of: - Positioning the first mechanical part and the second mechanical part of an assembly of mechanical parts relative to each other, the centring method being characterized by the steps of: - Supplying at least one centring part (2c, 2d, 3c, 3d) configured to centre at least the first mechanical part and the second mechanical part relative to each other, the centring part (2c, 2d, 3c, 3d) consisting of the first mechanical part and/or the second mechanical part, - At least partially reversible deforming the centring part (2, 3,), the at least partially reversible deformation being targeted on at least one first determined zone of deformation (Z1, Z2) of the centring part (2c, 2d, 3c, 3d), - Centring the first mechanical part and the second mechanical part relative to each other by the at least partially reversible deformation of at least the first determined deformation zone (Z1, Z2), the centring being achieved when said elastically deformed first determined zone of deformation (Z1, Z2) comes into contact with a portion of the first mechanical part or of the second mechanical part in the direction of the at least partially reversible deformation, the first mechanical part and the second mechanical part not being in contact with each other after centring, - Attaching at least one of the first mechanical part and the second mechanical part, where the first mechanical part is a piston of a compression machine, such as a linear compressor, preferably for a spacecraft cryocooler, and the second mechanical part is a piston sleeve of said compression machine. - Positioning the first mechanical part and the second mechanical part of an assembly of mechanical parts relative to each other, the centring method being characterized by the steps of: - Supplying at least one centring part (2c, 2d, 3c, 3d) configured to centre at least the first mechanical part and the second mechanical part relative to each other, the centring part (2c, 2d, 3c, 3d) consisting of the first mechanical part and/or the second mechanical part, - At least partially reversible deforming the centring part (2, 3,), the at least partially reversible deformation being targeted on at least one first determined zone of deformation (Z1, Z2) of the centring part (2c, 2d, 3c, 3d), - Centring the first mechanical part and the second mechanical part relative to each other by the at least partially reversible deformation of at least the first determined deformation zone (Z1, Z2), the centring being achieved when said elastically deformed first determined zone of deformation (Z1, Z2) comes into contact with a portion of the first mechanical part or of the second mechanical part in the direction of the at least partially reversible deformation, the first mechanical part and the second mechanical part not being in contact with each other after centring, - Attaching at least one of the first mechanical part and the second mechanical part, where the first mechanical part is a piston of a compression machine, such as a linear compressor, preferably for a spacecraft cryocooler, and the second mechanical part is a piston sleeve of said compression machine.