There is not really any configuration in NCM to set SSH port number. There is no setting on NCM model, Device Families, or the scripts themselves. Assuming the device is configured to accept SSH connections on whatever port you choose, and there is no firewall blocking the port, setting the port number in Spectrum on device attribute SshPortNum 0x12c06 should be sufficient.
If you're seeing communication issues, then would recommend to run netstat to verify the port is open, and Sniffer Trace / Packet Capture to verify communication to the device on that port.
Regards,
Jay V