ssh_init: Network error: Cannot assign requested address

Did you try:

pscp -P 22 c:\documents\foo.txt [email protected]:/tmp/foo

I had to go into the Putty Default Settings and "Save" them again, despite port 22 showing as the default. Worked for me to avoid adding the -P 22 option every time.


I had the same error and ended up at this page. The -P 22 did not solve my problem.

I use Putty saved sessions and double checked my command line and had the same error as the OP.

I was using:

pscp -l SESSION_NAME_IN_PUTTY ip:/remote_path local_path

I reviewed the command line options for pscp and changed the -l to -load and it worked.

The final command looked like:

pscp -load SESSION_NAME_IN_PUTTY ip:/remote_path local_path

Note: If you still have the error, please review your spelling of SESSION_NAME_IN_PUTTY and ensure it is an exact match. One letter off, can cause the same error.