The “Ports to use for initial scan” setting is the list the we will probe to see if they are open for our initial scan.
When we initially scan an endpoint the intent is to see which of the ports we could use to connect to the device are open, so we list things like 22(ssh), 23(telnet), 135(MicrosoftRPC).
We then use this to look up which credentials we have for those protocols and that endpoint to try and connect.
If we cannot connect then we fall back to trying to find as much out about the device as possible by other means. One of these things is to try and identify the TCP/IP stack to try and determine what operating system it might be. The “Port Scan Settings” page is the list of ports that we are allowed to scan when we do this.
The two settings do interact in that if you were to remove 23(telnet) from the “Port Scan Settings” page but left it in the “Ports to use for initial scan” setting then we wouldn’t connect.
If you remove ports from the “Ports to use for initial scan” setting then the system will not check them and will not use any related techniques. So if you remove 22(ssh) the system will not do any discovery via ssh.
You may wonder why port 80(http) is in the “Ports to use for initial scan” list. If you look elsewhere on that page you will see that we use both 80(http) and 23(telnet) to gain information about the system from the HEAD/Banner if we cannot connect.
Unless there is a strong reason to alter these settings you should leave them at their default.