A medical device, such as a hemodialysis machine or a peritoneal dialysis machine, is provided with control commands in a secure manner based on the commands being detected on a separate control component. The control commands are detected and thereupon a message is generated which contains a request to activate an operating element. Only if the indicated operating element has been activated is the control command forwarded to a dialysis machine for execution.