I'm guessing that ping ncp won't resolve the name either, so that's the basis of the problem, not anything specific to ssh. In order to resolve LAN names from OpenWrt running as a LAN device you have to disable rebind protection in the DHCP/DNS config.
Full OpenSSH is available as a package as an alternative to dropbear client.
I disabled rebind protection in the DHCP/DNS config but still getting the same error, same thing after a reboot too.
I don't fully understand it all but you're right ncp is not a hostname in my lan so ping ncp won't resolve to anything.
I thought ncp here is just a placeholder and ssh will look for a config file in ~/.ssh directory and then if found try to match ncp on a Host entry in ~/.ssh/config then take the rest of the details like Port, hostname and identity file from there too.
The ssh server on the other host IS listening on port 1022 as well. If I put Port 1022 into ~/.ssh/config I still get the error:
root@OpenWrt:/etc/dropbear# ssh ncp
ssh: Connection to root@ncp:22 exited: Connect failed: Error resolving 'ncp' port '22'. Name does not resolve
It still thinks I'm trying to connect to Port 22 instead of 1022? So maybe dropbear is not looking for my config in ~/.ssh/config?
I also tried putting that config file in /etc/dropbear.. is that where it is suppose to be?
Still don't get why this command work whens I run it in OpenWrt? # ssh -i ncp_key_dropbear root@192.168.1.124 -p 22
but this command does not.. ssh ncp