I have a Linux server to SSH, and the old port number was 1818. Recently there's been a network issue in my country that I had issue reaching my server port 1818. So I decided to change it to another port, like 46000. I then changed it to lower port number like 1994, and it worked well too.
But the issue is time I wait to get the first response when trying to do SSH port number 46000 is much longer than time spending on 1994.
Let me first explain my assumption: when I use ssh root@ip -p1994, my network checks the ports from 1 to 65535, and because 1994 is lower than 46000, so it takes less time to connect than 46000. My assumption is something like this:
check if port is correct:
is 1 SSH port? if no, ignore; else connect.
is 2 SSH port? if no, ignore; else connect.
is 1994 SSH port? so I (my network) and the server connect to each other.
While 46000 is much more down in my assumption, then it takes much longer to connect.
Is my assumption for this issue correct? If no, then what is the logic of this delay in connecting?
Thanks in advance