When I run:
plink -l <user> -pw <pass> <host> "<command>"
It gives FATAL ERROR: Network error: Connection refused. But when I run:
plink -P 22 -l <user> -pw <pass> <host> "<command>"
It works fine. So seems that in the first case PuTTY tries to connect to some other port on the host and fails because its server is run against port 22. So how can I change the default port plink tries to connect to?