Exodus 17:6

17:6 I will be standing before you there on the rock in Horeb, and you will strike the rock, and water will come out of it so that the people may drink.” And Moses did so in plain view of the elders of Israel.

Numbers 20:8-11

20:8 “Take the staff and assemble the community, you and Aaron your brother, and then speak to the rock before their eyes. It will pour forth its water, and you will bring water out of the rock for them, and so you will give the community and their beasts water to drink.”

20:9 So Moses took the staff from before the Lord, just as he commanded him. 20:10 Then Moses and Aaron gathered the community together in front of the rock, and he said to them, “Listen, you rebels, must we bring water out of this rock for you?” 20:11 Then Moses raised his hand, and struck the rock twice with his staff. And water came out abundantly. So the community drank, and their beasts drank too.