Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
try "plink -v" and check which port is selected. –  RJS Oct 3 '12 at 21:24
Connecting to <host> port 2922. So it selects 2922. –  Mihran Hovsepyan Oct 4 '12 at 5:49
this is not default. check your "default settings" in putty –  RJS Oct 4 '12 at 9:10
@RJS I know that this is not default. My question is "how to changes the default settings?". –  Mihran Hovsepyan Oct 5 '12 at 11:03
As I wrote. Run putty and check your default settings (Saved Sessions). plink use putty configuration. –  RJS Oct 8 '12 at 20:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.