ssh_init: Network error: Cannot assign requested address

DeploymentPuttyFile Transfer

Deployment Problem Overview


I am trying to set up a connection and transfer files using putty on a windows 10 platform. I have verified that the default port in putty is 22. When I run the command in the command line to connect and transfer files though I get the above error. Any idea why this is or what I should do?

Deployment Solutions


Solution 1 - Deployment

Did you try:

pscp -P 22 c:\documents\foo.txt user@example.com:/tmp/foo

Solution 2 - Deployment

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.

Solution 3 - Deployment

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.

Solution 4 - Deployment

In my case I had created a shortened "session name" in Putty -- that is, a shorter representation of the full hostname. This worked for most Putty functions -- but when I tried to use pscp I found that I needed to have a session name that was identical to the hostname.

Solution 5 - Deployment

I'm my case I was hitting this error because SSH was not enabled in Raspbian.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser12799293View Question on Stackoverflow
Solution 1 - DeploymentMarthaView Answer on Stackoverflow
Solution 2 - DeploymentTomRodView Answer on Stackoverflow
Solution 3 - DeploymentTaterheadView Answer on Stackoverflow
Solution 4 - DeploymentJohn C.View Answer on Stackoverflow
Solution 5 - DeploymentGeordieView Answer on Stackoverflow