The same ip with different subnet masks can point to different hosts

generally speaking, ip is used in conjunction with the subnet mask, which can be used to determine the network number and host number of the ip.
deduce that if the same ip is matched with different subnet masks, there will be two hosts with two different subnets. In other words, ip alone can"t locate the host you want to connect to. Then I wonder why we use
ssh username@ip address
when we connect to the server. Please give us some advice

.
Mar.04,2021

look at the longest matching principle

Menu