How to simulate button press on remote arduino with another arduino?

Hello, I have a very simple question but nothing I tried worked reliably.
I have one Arduino with one pin configured as "INTERNAL_PULLUP" so I can use a switch to short that pin to ground and detect keypress, everything working just fine as mechanical switch.

Now I want to be able to use another arduino to essentially do the same thing, to short that pin on another arduino to ground, without any transistors. I think theoretically I should be able to do so right? But somehow it does not work, what should be pin mode configuration and commands to make that possible?

Thank you.

Did you connect the grounds?

alexmg2:
Hello, I have a very simple question but nothing I tried worked reliably.
I have one Arduino with one pin configured as "INTERNAL_PULLUP" so I can use a switch to short that pin to ground and detect keypress, everything working just fine as mechanical switch.

Now I want to be able to use another arduino to essentially do the same thing, to short that pin on another arduino to ground, without any transistors. I think theoretically I should be able to do so right? But somehow it does not work, what should be pin mode configuration and commands to make that possible?

Thank you.

Your description starts to fall apart here

... "Now I want to be able to use another arduino to essentially do the same thing, to short that pin on another arduino to ground, without any transistors."

You first mentioned one arduino with internal pullup. Then you use "another" arduino..... and then you mention yet "another" arduino.

Probably a good idea to draw a diagram for clarity.