Please use the same logic that loads sshd.conf

see $sshd_config->{'Port'} above