Automated teller machine for paying in and/or paying out cash, comprising: a housing that has an opening facing a front (V) of the automated teller machine , a module that is mobile between a first position (P 30 1) in which it is arranged directly adjacent to the opening , and a second position (P 30 2) in which it is accessible from a rear (R) of the automated teller machine , and a security device for sealing and unsealing the opening , comprising: a sealing element that is mobile between a first position (P 500 1) in which it unseals the opening and a second position (P 500 2) in which it completely seals the opening , a coupling device set up to transmit a reverse movement of the module from its first position (P 30 1) in a direction (A) of its second position (P 30 2) to the sealing element such that the latter moves from its first position (P 500 1) to its second position (P 500 2), and a blocking device that has a blocked position in which it blocks a forward movement of the module in the direction (E) of its first position (P 30 1) until the module in its reverse movement has reached a third position (P 30 3) situated between its first position (P 30 1) and second position (P 30 2), and an enabled position in which it enables the forward movement of the module from its third position (P 30 3) in the direction of its first position (P 30 1), wherein the sealing element is in its second position (P 500 2) when the module is in its third position P( 30 3). a housing that has an opening facing a front (V) of the automated teller machine , a module that is mobile between a first position (P 30 1) in which it is arranged directly adjacent to the opening , and a second position (P 30 2) in which it is accessible from a rear (R) of the automated teller machine , and a security device for sealing and unsealing the opening , comprising: a sealing element that is mobile between a first position (P 500 1) in which it unseals the opening and a second position (P 500 2) in which it completely seals the opening , a coupling device set up to transmit a reverse movement of the module from its first position (P 30 1) in a direction (A) of its second position (P 30 2) to the sealing element such that the latter moves from its first position (P 500 1) to its second position (P 500 2), and a blocking device that has a blocked position in which it blocks a forward movement of the module in the direction (E) of its first position (P 30 1) until the module in its reverse movement has reached a third position (P 30 3) situated between its first position (P 30 1) and second position (P 30 2), and an enabled position in which it enables the forward movement of the module from its third position (P 30 3) in the direction of its first position (P 30 1), a sealing element that is mobile between a first position (P 500 1) in which it unseals the opening and a second position (P 500 2) in which it completely seals the opening , a coupling device set up to transmit a reverse movement of the module from its first position (P 30 1) in a direction (A) of its second position (P 30 2) to the sealing element such that the latter moves from its first position (P 500 1) to its second position (P 500 2), and a blocking device that has a blocked position in which it blocks a forward movement of the module in the direction (E) of its first position (P 30 1) until the module in its reverse movement has reached a third position (P 30 3) situated between its first position (P 30 1) and second position (P 30 2), and an enabled position in which it enables the forward movement of the module from its third position (P 30 3) in the direction of its first position (P 30 1), wherein the sealing element is in its second position (P 500 2) when the module is in its third position P( 30 3). <EOS>